Idempotent Reusable Barchart 101 with Lines
✓ Published0🌍 Public
A reusable, idempotent bar chart with an overlaid line encodes the proportion of single-detached houses in Canada from 1986 to 2021. Built with D3 v7, it uses `scaleBand` for the year categories, `scaleLinear` for percentages, and `axisLeft` with tick lines for the grid. The chart renders as SVG, with teal bars and a maroon line generated via `line()`. The reusable component pattern exposes setters for data, dimensions, margins, labels, and title, allowing the chart to be called on a new selection each time.
AI-generated descriptionMIT Licensed