Dc.js Change Default Color For Undefined Data In Choropleth Map
I'm using dc.js for a choropleth map with dc.geoChoroplethChart(). Previously with colorCalculator(), I can set the default color for null data. chart.colors(colorScale) .colo
Solution 1:
Deprecating colorCalculator
function was a mistake and the warning will be removed soon.
https://github.com/dc-js/dc.js/issues/1493
I don't like the way the function was implemented, and at the time I thought that scales can do everything that a function can do, but it is simply easier to write a function for this kind of thing.
Sometimes a special case is the best way to deal with an exception to the rule!
Alternately, if you are using a continuous or ordinal color scale, you may be able to use .unknown() which is a cleaner solution.
Post a Comment for "Dc.js Change Default Color For Undefined Data In Choropleth Map"