Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Idempotent Reusable Barchart 101

Public visualization

Viewing a saved revision (read-only)

00dd0d7726684bc1b221a1cf7a8a0293

Idempotent Reusable Barchart 101

0 stars1🌍 Public
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