{"id":41608,"library":"node-red-contrib-chartjs","title":"node-red-contrib-chartjs","description":"A Node-RED node that provides Chart.js-based charts for Node-RED dashboards. Version 0.5.2 supports line, multi-line, vertical/horizontal bar, pie, doughnut, polar area, bubble, and radar charts. Charts are served on configurable HTTP paths and can be updated at runtime via msg.payload. Uses socket.io and serve-static on the server side. This package is a Node-RED community contribution, not actively maintained with regular releases. Key differentiator: it enables dynamic chart creation and updates within Node-RED flows without custom code.","status":"active","version":"0.5.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","node-red","chart.js","chart"],"install":[{"cmd":"npm install node-red-contrib-chartjs","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-chartjs","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-chartjs","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"// This is a Node-RED node, imported automatically when installed\n// Flow: inject -> chartjs node -> http response\n// In inject node, set msg.payload to chart data:\n// Line chart example:\nmsg.payload = {\n  channel: \"Temperature\",\n  color: \"Red\",\n  dataset: [\n    { x: \"Jan\", y: 22 },\n    { x: \"Feb\", y: 25 }\n  ]\n};\nreturn msg;","lang":"javascript","description":"Shows how to send chart data to the Chart.js node via msg.payload in Node-RED."},"warnings":[{"fix":"Use array for linear (line, multi-line) charts, object for pie, bar, etc. See documentation for exact format.","message":"Dataset structure differs between linear and other chart types. Multi-line charts require array of objects with channel/color/dataset; others expect a single object.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Restart Node-RED server after npm install.","message":"Node-RED must be restarted after installing the package to register the nodes.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Configure a distinct path in node properties for each chart instance.","message":"Chart path must be unique across all chartjs nodes; duplicate paths cause conflicts.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.5.2':22 'activ':73 'area':33 'bar':29 'base':14 'bubbl':34 'chart':15,37,38,83,100 'chart.js':13,99 'chartj':5 'code':94 'communiti':70 'configur':42 'contrib':4 'contribut':71 'creation':84 'custom':93 'dashboard':20 'differenti':79 'doughnut':31 'dynam':82 'enabl':81 'flow':91 'http':43 'javascript':95 'key':78 'line':24,27 'maintain':74 'msg.payload':52 'multi':26 'multi-lin':25 'node':2,8,10,18,68,89,97 'node-r':7,17,67,88,96 'node-red-contrib-chartj':1 'packag':64 'path':44 'pie':30 'polar':32 'provid':12 'radar':36 'red':3,9,19,69,90,98 'regular':76 'releas':77 'runtim':50 'serv':40,57 'serve-stat':56 'server':61 'side':62 'socket.io':54 'static':58 'support':23 'updat':48,86 'use':53 'version':21 'vertical/horizontal':28 'via':51 'within':87 'without':92","created_at":"2026-06-04T18:53:14.221529+00:00","updated_at":"2026-06-04T18:53:14.221529+00:00","problems":[{"fix":"Check that Node-RED is running and chart path (e.g., /myChart) is not blocked by firewall. Restart both Node-RED and browser.","cause":"Missing or incorrect socket.io connection; chart path not accessible.","error":"Chart not displaying, only shows 'Loading...'"},{"fix":"Ensure msg.payload contains a valid dataset array with x and y fields. Example: { dataset: [{ x: 'A', y: 1 }] }","cause":"msg.payload missing or malformed dataset.","error":"TypeError: Cannot read property 'dataset' of undefined"},{"fix":"Reinstall package: npm install node-red-contrib-chartjs --save","cause":"Static files not served correctly; node-red-contrib-chartjs dependency missing.","error":"Chart.js not found (404 for chart.js script)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"node-red-contrib-chartjs","openapi_spec":null,"status_page":null,"smithery":null,"categories":["visualization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}