Skip to main content
100%

D3 DataBinding

✓ Published0🌍 Public
663anp3ca
Last edited Sep 20, 2018
Created on Sep 20, 2018

A simple bar chart visualizes municipal census data using two SVG elements, where each bar's width maps to a numeric census value via `d3.scaleLinear`. The code loads JSON data from a GitHub repository using `d3.json` and binds it to rectangles and text labels with `.data()` and `.enter()`. Bars are sorted in descending order and labeled with municipality names, while the chart dimensions derive from the SVG attributes. Built with D3 v5, the example demonstrates basic data joins for both shapes and annotations, though it only renders one of the two defined chart instances.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes