0.2.0 • Published 6 years ago
d3-chart-package v0.2.0
d3-chart-package
What is it
Use it ,you can program reguler chart quickly based on d3.js.
- Chart type: Including but not limited to bar, line, scatter and pie.
- Configuration: At the beginning, it will not open the configuration items very detaily. The thinking of default configuration comes from Gradict
The difference (sparkle)
For business analysis scenarios
example:
- You can easily use
.sort()
to sort bar chart, then get ranking information. - You can easily use
.hightlight('max', 3)
to get the top three. - You can easily use
.compare(data)
to compare data with last year. - ...
All of the above can be done with animation, you can clearly see the relationship between the data.
The overview idea is as follows.
How to use
npm install d3-chart-package
import $chart from 'd3-chart-package'
$chart(dom, data).bar({x: 'field', y: 'value'}).render()
Add use below script to see more api.
Script
Development mode
npm run start
then you can see web page as followsPublish npm package
npm run build
npm publish
dev log
- bar
- grouped bar chart
- stacked bar chart
- Histogram
- interaction
- ...