Chart.js分层缩放插件

用于分层树状数据结构的 Chart.js 比例尺。「Chart.js scale for hierarchical tree-like data structure」

Github星跟踪图

Chart.js Hierarchical Scale Plugin

datavisyn NPM Package Github Actions

Chart.js module for adding a new categorical scale which mimics a hierarchical tree.

hierarchy

Check out also my other chart.js plugins:

Install

npm install --save chart.js chartjs-plugin-hierarchical

Usage

see Examples

or at this Open in CodePen

Scale

a new scale type hierarchical.

Styling

The hierarchical axis scale has the following styling options

see IHierarchicalScaleOptions

Data structure

see ILabelNode and IValueNode

ESM and Tree Shaking

The 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.

import { Chart } from 'chart.js';
import { HierarchicalScale } from 'chartjs-plugin-hierarchical';

// register scale in chart.js and ensure the defaults are set
Chart.register(HierarchicalScale);
...

Development Environment

npm i -g yarn
yarn install
yarn sdks vscode

Common commands

yarn compile
yarn test
yarn lint
yarn fix
yarn build
yarn docs


developed by datavisyn.

主要指标

概览
名称与所有者sgratzl/chartjs-plugin-hierarchical
主编程语言TypeScript
编程语言JavaScript (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2019-06-14 12:37:10
推送于2025-04-12 15:21:35
最后一次提交
发布数51
最新版本名称v4.4.4 (发布于 )
第一版名称v1.0.1 (发布于 2018-06-27 09:05:15)
用户参与
星数57
关注者数3
派生数11
提交数392
已启用问题?
问题数19
打开的问题数2
拉请求数61
打开的拉请求数6
关闭的拉请求数22
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?