Viewing a saved revision (read-only)
14e2537cc2844248a74544f627b2fedc
A6 Sequential Color Barchart
This example visualizes total cancer deaths by U.S. state using a sequential color barchart. The bars encode the death count by height while their color reflects the death rate per 100,000 people, ranging from light to dark red. Hovering over a bar reveals precise values via a native title tooltip. The chart is built with D3 v7, using `d3.scaleBand` and `d3.scaleLinear` for axes, `d3.scaleSequential` with `d3.interpolateReds` for color, and the `d3-legend` plugin to display the color threshold legend. Data comes from the CORGIS dataset, rendered as SVG.
AI-generated descriptionVisualization of total opioid deaths from the CORGIS dataset made with D3. Implementation learned from DataVizDad on Youtube
Hover over bars to see precise values.