Skip to main content
100%

d3 js

✓ Published0🌍 Public
Jjhansi
Last edited Mar 22, 2022
Created on Mar 22, 2022
Forked from Customizing Axes

This bar chart displays the populations of the top 10 most populous countries, based on 2018 estimates from the United Nations World Population Prospects 2017. It shows a horizontal bar for each country, with the population value scaled linearly along the x-axis. The visualization uses D3 v5 APIs including `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the axes, while customizing tick formats to abbreviate large numbers and removing axis domain lines. Bars are rendered as SVG rectangles, with data loaded from a local CSV file. The code also demonstrates styling through an external CSS file.

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