javascript - d3 choropleth map having problems with filling colors -
i followed mike bostock choropleth example trying make world population choropleth map i'm having trouble filling in colors correctly.
here's code , data: http://bl.ocks.org/jeremycflin/572ca92be1dfe68ac0d3
really, answers or can take me right direction appreciated.
thank in advance!
maybe try different scale? china has quite lot of people, pushing of countries lower segments.
everyone starting place 4 @ lowest segment.
quantize(1330141295) // china >"q8-9" quantize(1173108018) // india >"q7-9" quantize(310232863) // united states >"q2-9" quantize(242968342) // indonesia >"q1-9" quantize(201103330) // brazil >"q1-9"
if replace maximum scale example population of brazil you'll see there more colors used.
var quantize = d3.scale.quantize() .domain([0,201103330]) .range(d3.range(9).map(function(i) { return "q" + + "-9"; }));
you use the quantile scale utilize segments.
Comments
Post a Comment