Closed drapadubok closed 8 years ago
Now that I've read into the source, I have a hunch that only the linear scale is supported with custom cell labels, am I correct? I can try to extend the functionality to add the custom labels to other scale, but maybe you have some ideas that can help on that front?
There is a labels properly. You can send it the output of your newLabels function:
// I thought that I could just map the values to format I wanted: var newLabels = colorScale.quantiles().map( function(i) { return ' ≤ ' + i; });
var legend = d3.legend.color() .cells(newLabels) .scale(colorScale) .labels(newLabels)
Let me know if you have any issues with getting that to work.
Thanks, Susie
Awesome, this worked out perfectly, thank you!
Hi, thank you so much for this package, helped me a lot! However, I have a small question, it seems that I'm missing some simple idea about creating custom legend labels. Right now I have labels that look like '40 to 102', but I would like to have something like '≤ 102'. For example, I have:
However, when I do this, nothing changes, I still have the same '40 to 102' type of labels. Can you suggest how I can troubleshoot this?
Thank you!