Line Graph
✓ Published0🌍 Public
This example visualizes car sales data from 2013–2021 as a grid of colored rectangles, mapping years to the x-axis and countries to the y-axis, with fill intensity reflecting Happiness_Score. Using D3 v5, it employs `scaleBand` for both axes, `scaleLinear` with an `interpolateRgb`-based range for color encoding, and `axisTop`/`axisLeft` to render axes without tick lines. The chart loads a CSV from a GitHub gist, parses years as dates and scores as numbers, and renders SVG rectangles with a steelblue-to-lightgray color gradient. The code highlights D3’s modular imports (`select`, `csv`, `scaleBand`, `scaleLinear`) and SVG rendering for a heatmap-style matrix.
AI-generated descriptionMIT Licensed