Skip to main content
100%

Making a bar Chart

✓ Published1🌍 Public
Ppengpenghub
Last edited Mar 8, 2020
Created on Mar 8, 2020
Forked from HTML Starter

This example shows a horizontal bar chart of country populations, ranking ten nations from China to Mexico using data loaded from a CSV file. The visualization uses D3 v5’s `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft` and `axisBottom` to render axes as SVG. Population values are read as strings and multiplied by 1000 before being mapped to bar widths. Bars are appended as `rect` elements within a translated group, styled with steelblue fills via external CSS.

AI-generated description
MIT Licensed

Similar vizzes