Skip to main content
100%

Fork of Making a Bar Chart

✓ Published0🌍 Public
SSander Rebane
Last edited Mar 3, 2024
Created on Mar 3, 2024
Forked from Making a Bar Chart

This example visualizes the top 10 most populous countries in 2018, using horizontal bars to compare population estimates from the United Nations World Population Prospects. It demonstrates how to customize D3 axes, removing unnecessary lines and formatting tick labels. The chart is built with D3 v5, using `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisBottom` and `axisLeft` to render the axes. Population values are loaded from a CSV file and multiplied by 1,000. The final visualization is rendered as inline SVG, with styled bars and a title.

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.

MIT Licensed

Similar vizzes