🌍 Public
Viewing a saved revision (read-only)
744a881fe1b44ce998f1143c6dffac6c
Idempotent Reusable Barchart 101
AAlex
Last edited Apr 10, 2023
Created on Apr 10, 2023
This example presents an animated, reusable bar chart that visualizes the proportion of single-detached houses in Canada from 1986 to 2021. Built with D3.js (v7.8.4), it uses the `scaleBand` and `scaleLinear` functions to map census years and percentages, while `axisBottom` and `axisLeft` render the axes. The chart is implemented as an idempotent function, allowing it to be re-applied cleanly to an SVG canvas when parameters change, with bars rendered as SVG rectangles.
AI-generated description