Chart.js分层缩放插件

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

Github stars Tracking Chart

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.

Overview

Name With Ownersgratzl/chartjs-plugin-hierarchical
Primary LanguageTypeScript
Program languageJavaScript (Language Count: 2)
Platform
License:MIT License
Release Count47
Last Release Namev4.4.0 (Posted on )
First Release Namev1.0.1 (Posted on 2018-06-27 09:05:15)
Created At2019-06-14 12:37:10
Pushed At2024-04-11 11:55:59
Last Commit At
Stargazers Count47
Watchers Count4
Fork Count11
Commits Count348
Has Issues Enabled
Issues Count18
Issue Open Count3
Pull Requests Count45
Pull Requests Open Count2
Pull Requests Close Count6
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top