{"id":13701984,"url":"https://github.com/sgratzl/chartjs-plugin-hierarchical","last_synced_at":"2025-09-11T12:31:33.747Z","repository":{"id":38039671,"uuid":"191940475","full_name":"sgratzl/chartjs-plugin-hierarchical","owner":"sgratzl","description":"Chart.js scale for hierarchical tree-like data structure","archived":false,"fork":false,"pushed_at":"2024-04-11T11:55:59.000Z","size":13389,"stargazers_count":47,"open_issues_count":4,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-02T00:05:57.244Z","etag":null,"topics":["chartjs","chartjs-bar","chartjs-plugin","grouping","hierachical","javascript","tree-structure"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"datavisyn/chartjs-scale-hierarchical","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgratzl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["sgratzl"]}},"created_at":"2019-06-14T12:37:10.000Z","updated_at":"2024-06-08T22:37:57.958Z","dependencies_parsed_at":"2024-03-02T02:39:34.750Z","dependency_job_id":"a7542300-d7a2-4870-8bf9-962e1333658b","html_url":"https://github.com/sgratzl/chartjs-plugin-hierarchical","commit_stats":{"total_commits":250,"total_committers":8,"mean_commits":31.25,"dds":"0.44799999999999995","last_synced_commit":"c91f47ed0bf7f5a49457485fb98a6314120dc586"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgratzl%2Fchartjs-plugin-hierarchical","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgratzl%2Fchartjs-plugin-hierarchical/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgratzl%2Fchartjs-plugin-hierarchical/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgratzl%2Fchartjs-plugin-hierarchical/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgratzl","download_url":"https://codeload.github.com/sgratzl/chartjs-plugin-hierarchical/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232646348,"owners_count":18555272,"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":["chartjs","chartjs-bar","chartjs-plugin","grouping","hierachical","javascript","tree-structure"],"created_at":"2024-08-02T21:00:28.993Z","updated_at":"2025-01-05T21:41:05.439Z","avatar_url":"https://github.com/sgratzl.png","language":"TypeScript","readme":"# Chart.js Hierarchical Scale Plugin\n\n[![datavisyn][datavisyn-image]][datavisyn-url] [![NPM Package][npm-image]][npm-url] [![Github Actions][github-actions-image]][github-actions-url]\n\nChart.js module for adding a new categorical scale which mimics a hierarchical tree.\n\n![hierarchy](https://user-images.githubusercontent.com/4129778/41763778-6722e04a-75ff-11e8-84ad-1b417fd25c65.gif)\n\n## Related Plugins\n\nCheck out also my other chart.js plugins:\n\n- [chartjs-chart-boxplot](https://github.com/sgratzl/chartjs-chart-boxplot) for rendering boxplots and violin plots\n- [chartjs-chart-error-bars](https://github.com/sgratzl/chartjs-chart-error-bars) for rendering errors bars to bars and line charts\n- [chartjs-chart-geo](https://github.com/sgratzl/chartjs-chart-geo) for rendering map, bubble maps, and choropleth charts\n- [chartjs-chart-graph](https://github.com/sgratzl/chartjs-chart-graph) for rendering graphs, trees, and networks\n- [chartjs-chart-pcp](https://github.com/sgratzl/chartjs-chart-pcp) for rendering parallel coordinate plots\n- [chartjs-chart-venn](https://github.com/sgratzl/chartjs-chart-venn) for rendering venn and euler diagrams\n- [chartjs-chart-wordcloud](https://github.com/sgratzl/chartjs-chart-wordcloud) for rendering word clouds\n\n## Install\n\n```bash\nnpm install --save chart.js chartjs-plugin-hierarchical\n```\n\n## Usage\n\nsee [Examples](https://www.sgratzl.com/chartjs-plugin-hierarchical/examples/)\n\nor at this [![Open in CodePen][codepen]](https://codepen.io/sgratzl/pen/KKdryvg)\n\n## Scale\n\na new scale type `hierarchical`.\n\n## Styling\n\nThe `hierarchical` axis scale has the following styling options\n\nsee [IHierarchicalScaleOptions](https://www.sgratzl/com/chartjs-plugin-hierarchical/api/interfaces/IHierarchicalScaleOptions.html)\n\n## Data structure\n\nsee [ILabelNode](https://www.sgratzl/com/chartjs-plugin-hierarchical/api/interfaces/ILabelNode.html) and [IValueNode](https://www.sgratzl/com/chartjs-plugin-hierarchical/api/interfaces/IValueNode.html)\n\n### ESM and Tree Shaking\n\nThe ESM build of the library supports tree shaking thus having no side effects. As a consequence the chart.js library won't be automatically manipulated nor new controllers automatically registered. One has to manually import and register them.\n\n```js\nimport { Chart } from 'chart.js';\nimport { HierarchicalScale } from 'chartjs-plugin-hierarchical';\n\n// register scale in chart.js and ensure the defaults are set\nChart.register(HierarchicalScale);\n...\n```\n\n## Development Environment\n\n```sh\nnpm i -g yarn\nyarn install\nyarn sdks vscode\n```\n\n### Common commands\n\n```sh\nyarn compile\nyarn test\nyarn lint\nyarn fix\nyarn build\nyarn docs\n```\n\n---\n\n\u003ca href=\"https://www.datavisyn.io\"\u003e\u003cimg src=\"https://www.datavisyn.io/img/logos/datavisyn-d-logo.png\" align=\"left\" width=\"25px\" hspace=\"10\" vspace=\"6\"\u003e\u003c/a\u003e\ndeveloped by **[datavisyn][datavisyn-url]**.\n\n[datavisyn-image]: https://img.shields.io/badge/datavisyn-io-black.svg\n[datavisyn-url]: https://www.datavisyn.io\n[npm-image]: https://badge.fury.io/js/chartjs-plugin-hierarchical.svg\n[npm-url]: https://npmjs.org/package/chartjs-plugin-hierarchical\n[github-actions-image]: https://github.com/sgratzl/chartjs-plugin-hierarchical/workflows/ci/badge.svg\n[github-actions-url]: https://github.com/sgratzl/chartjs-plugin-hierarchical/actions\n[codepen]: https://img.shields.io/badge/CodePen-open-blue?logo=codepen\n","funding_links":["https://github.com/sponsors/sgratzl"],"categories":["Plugins"],"sub_categories":["Features"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgratzl%2Fchartjs-plugin-hierarchical","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgratzl%2Fchartjs-plugin-hierarchical","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgratzl%2Fchartjs-plugin-hierarchical/lists"}