Making a Bar Chart
✓ Published0🌍 Public
This bar chart shows the population of the top 10 most populous countries in 2018, using data from the United Nations’ World Population Prospects 2017. It demonstrates D3 axis customization by removing default domain lines, styling tick lines, and adding a custom axis label. The code uses `d3.csv` to load data, `d3.scaleLinear` for the population axis, `d3.scaleBand` for country categories, and `d3.axisLeft` and `d3.axisBottom` to render the axes as SVG elements with a custom tick format converting billions to a shorter notation.
AI-generated descriptionThis 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.
MIT Licensed