I\'m trying to build a histogram script that compares values within, say, 20% of some \"focus\" value.
So, for a focus value of 75, I\'d look at values ranging from 60 t
From the documentation on .ticks():
The specified count is only a hint; the scale may return more or fewer values depending on the input domain.
Instead of messing around with .ticks()
, just make the bins yourself:
tempScale = d3.scale.linear().domain([0, bins]).range([lowerBand, upperBand]);
tickArray = d3.range(bins + 1).map(tempScale);
and pass that array to .tickValues() and .bins().