UNPKG

d3-axes

Version:

D3 plugin to manage pairs of axes.

27 lines (23 loc) 1.39 kB
The aim of d3-axes is to remove some of the common tasks when creating charts with [d3][d3]; and to do this in a way that complements D3 itself. D3 is for creating data visualisations and provides the modules for the most simplest of data visualisations: [d3-selection][d3-selection], [d3-shape][d3-shape] and [d3-scale][d3-scale]. These same modules are also sufficient for the most complex visualisations, which can be seen in D3's [gallery][gallery]. D3 also provides modules for some of the common elements in the language of data visualisations, such as axes ([d3-axis][d3-axis]) and maps ([d3-geo][d3-geo]). The aim of this module is not to replace nor hide any of the above. Instead this module manages the relationship between a pair of axes. There are functions to position an axis and labels relative to its pair and each axis will be sized in a common area. Futhermore, there are functions for generating grid lines. For a demo see: [http://au-phiware.github.io/d3-axes][gh-pages]. [d3]: https://www.npmjs.com/package/d3 [d3-selection]: https://www.npmjs.com/package/d3-selection [d3-shape]: https://www.npmjs.com/package/d3-shape [d3-scale]: https://www.npmjs.com/package/d3-scale [d3-axis]: https://www.npmjs.com/package/d3-axis [d3-geo]: https://www.npmjs.com/package/d3-geo [gallery]: https://github.com/d3/d3/wiki/Gallery [gh-pages]: http://au-phiware.github.io/d3-axes