Skip to main content
100%

Bar Chart example

✓ Published0🌍 Public
SSpandan Ghosh
Last edited Jul 15, 2021
Created on Jul 15, 2021
Forked from Customizing Axes

This bar chart displays population figures for ten countries, with horizontal bars ordered by country name along the y-axis and population magnitude on the x-axis. The visualization uses D3 v5’s `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to load data, map values, and render axes, while SVG rectangles encode the bar lengths. Population values are multiplied by 1000 post-import, with tick labels formatted via `format('.3s')` and replacing 'G' with 'B'. Axis gridlines extend across the plotting area, and titles are added as SVG text elements.

AI-generated description
MIT Licensed

Similar vizzes