logarithmic colour scale
✓ Published0🌍 Public
RRobinL
Last edited Dec 17, 2016
Created on Dec 17, 2016
This example shows how a logarithmic color scale maps changing data values to colors, compared to a linear mapping. It renders a horizontal strip of rectangles, each colored according to its position on a log scale, with an axis below using `d3.axisBottom` for reference. Using D3 v4 with SVG, the code defines a log scale with `d3.scaleLog()`, inverts data values to create color stops, and assigns fills to the rectangles via the custom `logColour_scale`.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed