{"id":26738758,"url":"https://github.com/jacktuck/node-chartjs","last_synced_at":"2025-08-18T23:08:19.243Z","repository":{"id":85471410,"uuid":"119696417","full_name":"jacktuck/node-chartjs","owner":"jacktuck","description":"Chart.js on the server in Node.js","archived":false,"fork":false,"pushed_at":"2018-02-16T21:54:49.000Z","size":10121,"stargazers_count":25,"open_issues_count":1,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T21:22:36.084Z","etag":null,"topics":["canvas","chartjs","chartsjs","nodejs","serverside"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacktuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-31T14:15:58.000Z","updated_at":"2023-05-12T19:10:28.000Z","dependencies_parsed_at":"2023-03-12T22:15:46.174Z","dependency_job_id":null,"html_url":"https://github.com/jacktuck/node-chartjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacktuck/node-chartjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Fnode-chartjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Fnode-chartjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Fnode-chartjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Fnode-chartjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacktuck","download_url":"https://codeload.github.com/jacktuck/node-chartjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacktuck%2Fnode-chartjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271073387,"owners_count":24694538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","chartjs","chartsjs","nodejs","serverside"],"created_at":"2025-03-28T03:38:13.207Z","updated_at":"2025-08-18T23:08:19.172Z","avatar_url":"https://github.com/jacktuck.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-chartjs\n\nChart.js on the server in Node.js 8.x.x or later\n\nBased on previous work by https://github.com/vmpowerio/chartjs-node\n\n*With a few improvements we think:*\n\n- Uses the newer ~9.x.x~ 11.x.x version of JSDOM\n- Does not pollute node's global namespace\n\n\u003e Note that we strongly advise against trying to \"execute scripts\" by mashing together the jsdom and Node global environments (e.g. by doing global.window = dom.window), and then executing scripts or test code inside the Node global environment. Instead, you should treat jsdom like you would a browser, and run all scripts and tests that need access to a DOM inside the jsdom environment, using window.eval or runScripts: \"dangerously\". This might require, for example, creating a browserify bundle to execute as a \u003cscript\u003e element—just like you would in a browser.\n\n## 💖 Made possibly by:\n\n- [node-canvas](https://github.com/Automattic/node-canvas) - a Cairo backed Canvas implementation for NodeJS. See [installation wiki](https://github.com/Automattic/node-canvas/wiki/Installation---Ubuntu-and-other-Debian-based-systems)\n\n- [jsdom](https://github.com/jsdom/jsdom) - a implementation of the WHATWG DOM and HTML standards for use with node.js\n\n\n## Getting Started\n\n### Peer Dependencies\n\nYou'll need to `npm install chart.js` as it is a peer dependency of node-chartjs. Tested with `chart.js@2.4.x` any later and we have artifacts there are some issues open upstream, we anticipate fixes in 2.8.x*\n\nAlso make sure you have installed canvas' dependencies ([see installation wiki](https://github.com/Automattic/node-canvas/wiki/_pages))\n\n```\nnpm install node-chartjs\n```\n\n## Usage\n\n```js\nconst Chart = require('node-chartjs')\nconst chart = new Chart(200, 200) // 1000 x 1000 is default\n\nchart.makeChart({ ... })\n.then(res =\u003e {\n  chart.drawChart()\n\n  chart.toFile('test.line.png')\n    .then(_ =\u003e {\n      // file is written\n    })\n})\n```\n\nSee examples folder for more\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacktuck%2Fnode-chartjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacktuck%2Fnode-chartjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacktuck%2Fnode-chartjs/lists"}