Skip to main content
100%

D3 Course 1: Bar Chart

✓ Published2🌍 Public
支支良
Last edited Mar 29, 2020
Created on Mar 29, 2020

This bar chart displays population figures for ten countries, from China at over 1.4 billion down to Mexico at 130 million. The visualization uses D3 v5 with a promise-based data-loading pattern, where `csv` fetches `data.csv` and multiplies each population value by 1,000. The SVG rendering employs `scaleLinear` and `scaleBand` for axes, with `axisBottom` and `axisLeft` to draw ticks and gridlines. The chart formats population labels as abbreviated values with a custom tick formatter that replaces "G" with "B", and removes the domain lines for a cleaner look.

AI-generated description

Data Visualization with D3 course; Bar Chart

MIT Licensed

Similar vizzes