{"id":21851820,"url":"https://github.com/synapsium/ngx-chartjs","last_synced_at":"2025-06-21T10:05:36.921Z","repository":{"id":33660270,"uuid":"157089644","full_name":"Synapsium/ngx-chartjs","owner":"Synapsium","description":"Angular wrapper library for beautiful charts based on Chartjs","archived":false,"fork":false,"pushed_at":"2023-01-07T02:34:57.000Z","size":443,"stargazers_count":2,"open_issues_count":30,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T16:52:43.225Z","etag":null,"topics":["angular","chartjs","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Synapsium.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}},"created_at":"2018-11-11T14:49:34.000Z","updated_at":"2022-06-13T09:36:14.000Z","dependencies_parsed_at":"2023-01-15T02:01:01.294Z","dependency_job_id":null,"html_url":"https://github.com/Synapsium/ngx-chartjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Synapsium/ngx-chartjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synapsium%2Fngx-chartjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synapsium%2Fngx-chartjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synapsium%2Fngx-chartjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synapsium%2Fngx-chartjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Synapsium","download_url":"https://codeload.github.com/Synapsium/ngx-chartjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Synapsium%2Fngx-chartjs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261103180,"owners_count":23109928,"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":["angular","chartjs","wrapper"],"created_at":"2024-11-28T01:11:27.568Z","updated_at":"2025-06-21T10:05:31.903Z","avatar_url":"https://github.com/Synapsium.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height=\"200px\" width=\"200px\"  src=\"https://www.chartjs.org/img/chartjs-logo.svg\"\u003e\n  \u003ca href=\"https://synapsium.com\"\u003e\n    \u003ch1 align=\"center\"\u003engx-chartjs\u003c/h1\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nQuickly way to integrate \u003ca href=\"https://www.chartjs.org\"\u003eChart.js\u003c/a\u003e components with \u003ca href=\"https://angular.io/\"\u003eAngular\u003c/a\u003e\n\u003c/p\u003e\n\n# chart.js\n\nOne of the most popular and powerful open source library to create a  data visualization. To use this library you should get familiar with the \u003ca href=\"https://www.chartjs.org\"\u003eChart.js\u003c/a\u003e documentation.\n\n## Setup\n\n### Installation\n\nInstall `chart.js` and `ngx-chartjs` library from `npm`\n\n```bash\nnpm install chart.js @synapsium/ngx-chartjs --save\n```\n\nInstall `@types/chart.js` library from `npm`\n\n```bash\nnpm install @types/chart.js --save-dev\n```\n\n### Module usage\n\nAdd `ChartjsModule` to module\n\n```javascript\nimport { ChartjsModule, ChartjsConfig, CHARTJS_CONFIG } from '@synapsium/ngx-chartjs';\n\nconst DEFAULT_CHARTJS_CONFIG: ChartjsConfig = {\n    options {\n        responsive: true,\n        maintainAspectRatio: false\n    }\n};\n\n@NgModule({\n  ...\n  imports: [\n    ...\n    ChartjsModule\n  ],\n  providers: [\n    {\n      provide: CHARTJS_CONFIG,\n      useValue: DEFAULT_CHARTJS_CONFIG\n    }\n  ]\n})\n```\n\nCheck out the \u003ca href=\"https://www.chartjs.org/docs/latest/\"\u003eAPI Doc\u003c/a\u003e for the available options.\n\n\n## How to use\n\nIn your target component integrate chartjs element :\n```html\n\u003cchartjs [className]=\"chart\" \n         [type]=\"type\" \n         [data]=\"data\" \n         [options]=\"options\"\u003e\n\u003c/chartjs\u003e\n```\n### Inputs\n\n| Input             | Type                           | Default           | Description                                                       |\n| ----------------- | ------------------------------ | ----------------- | -----------------------------------------------------------------------------------------------------------------------------------------    |\n| className         | `string`                       |                   | Custom css class name applied on parent container of chart canvas |\n| type              | `string`                       | `'doughnut'`      | Type of chart : `'doughnut'`, `'line'`, `'bar'`, `'radar'`, `'pie'`, `'polarArea'`, `'bubble'`, `'scatter'` |\n| data           | `ChartData`                         | `'{}'`             | \u003ca href=\"https://www.chartjs.org/docs/latest/getting-started/usage.html\"\u003eData of chart\u003c/a\u003e                                                                                                              |\n| options   | `ChartOptions`                         | `{ responsive: true, maintainAspectRatio: false}`              | \u003ca href=\"https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/chart.js/index.d.ts\"\u003eOptions of chart\u003c/a\u003e                                                                                            |\n\n\u003e `Options` properties of global config will be replaced by local `Options`.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynapsium%2Fngx-chartjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynapsium%2Fngx-chartjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynapsium%2Fngx-chartjs/lists"}