{"id":17042404,"url":"https://github.com/boo1ean/electron-chartjs","last_synced_at":"2025-03-23T01:30:33.789Z","repository":{"id":66155910,"uuid":"111920279","full_name":"boo1ean/electron-chartjs","owner":"boo1ean","description":"Render chart.js charts using electron","archived":false,"fork":false,"pushed_at":"2017-11-24T14:16:08.000Z","size":14,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T04:46:25.759Z","etag":null,"topics":["chart","chartjs","electron","visua"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boo1ean.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-11-24T13:14:28.000Z","updated_at":"2024-08-19T15:11:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9c92675-4a14-41a1-87e1-ae9ff4d47481","html_url":"https://github.com/boo1ean/electron-chartjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boo1ean%2Felectron-chartjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boo1ean%2Felectron-chartjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boo1ean%2Felectron-chartjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boo1ean%2Felectron-chartjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boo1ean","download_url":"https://codeload.github.com/boo1ean/electron-chartjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043791,"owners_count":20551837,"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","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":["chart","chartjs","electron","visua"],"created_at":"2024-10-14T09:16:52.318Z","updated_at":"2025-03-23T01:30:33.754Z","avatar_url":"https://github.com/boo1ean.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Render [chart.js](http://www.chartjs.org/) charts using [electron](https://electronjs.org/)\n\nLeverage `chart.js` and `electron` features for quick visualisations.\n\nThis modules just proxies options to `chart.js` constructor.\n\nSee [chart.js](http://www.chartjs.org/docs/latest/) documentation for options.\n\n## Installation\n\n```\nnpm i electron-chartjs\n```\n\n## Usage\n\nThe only difference from `chart.js` constructor - you need to skeep context argument.\n\nSimple barchart:\n\n```javascript\nconst chart = require('electron-chartjs')\nchart({\n\ttype: 'bar',\n\tdata: {\n\t\tlabels: ['a', 'b', 'c', 'd'],\n\t\tdatasets: [{\n\t\t\tlabel: 'red bars',\n\t\t\tbackgroundColor: '#ab1020',\n\t\t\tdata: [0, 3, 4, 1],\n\t\t}],\n\t}\n})\n```\n\nwill render window with barchart.\n\nFor more charts check [chart.js docs](http://www.chartjs.org/docs/latest/)\n\n## Why?\n\nTo reduce number of actions you need to perform for visualizing data from database using js.\n\nNo need to setup client + server to render some charts with js.\n\nExample:\n\n```javascript\nconst usersByAge = await knex.raw(`\n\tselect age, count(age) as count\n\tfrom users\n\tgroup by age\n`)\nconst labels = _.map(usersByAge, 'age')\nconst data = _.map(usersByAge, 'count')\nchart({\n\ttype: 'bar',\n\tdata: {\n\t\tlabels,\n\t\tdatasets: [{\n\t\t\tlabel: 'users by age',\n\t\t\tbackgroundColor: '#bada55',\n\t\t\tdata,\n\t\t}],\n\t},\n})\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboo1ean%2Felectron-chartjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboo1ean%2Felectron-chartjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboo1ean%2Felectron-chartjs/lists"}