mapmap.js
mapmap.js copied to clipboard
Custom scales system
trafficstars
D3's scale system has proven to be insufficient for our purposes. We need a scale system that fulfills the following needs:
- introspection of scale objects to find out about their properties (for legend generation etc.)
- strict handling of undefined and invalid values
- support for "nested" scales, e.g. having an ordinal scale taking care of undefined and invalid/special values, and a numeric scale for valid values
- support for multivariate scales
- support for setting up the scale (domain, range) from actual data through a callback (for things like Jenks natural breaks, quantile scales, ...)
Also see #12, #25
TODO: investigate if D3 v4 offers improvements in this respect.