Skip to main content
100%

Customizing Axes

✓ Published0🌍 Public
CCameron
Last edited Jun 29, 2020
Created on Jun 29, 2020
Forked from Customizing Axes

This bar chart displays the top 10 most populous countries in 2018, based on United Nations population estimates. It shows how D3 axis customization can enhance readability, using custom tick formats (e.g., abbreviating millions as "B") and styled grid lines. The chart employs `d3.scaleLinear` and `d3.scaleBand` for scales, with `d3.axisBottom` and `d3.axisLeft` for axes. SVG rendering styles tick text, grid lines, and labels via CSS. Data is loaded from a CSV file using `d3.csv`, with population values multiplied by 1000.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.

See also the first bar chart visualization that this one builds on: Making a Bar Chart.

MIT Licensed

Similar vizzes