Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
Iimpadc97
Last edited May 30, 2020
Created on May 30, 2020
Forked from Making a Bar Chart

This visualization displays the top 10 most populous countries using a horizontal bar chart, with population values from a 2018 United Nations estimate. It also includes a second bar chart showing average monthly volumes from a JSON dataset. The code imports D3 v5 modules like `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the SVG chart. Axes are customized by styling ticks, and bars are rendered as SVG `rect` elements with a steelblue fill. Data loads asynchronously via `d3.json` and updates the visualization through a render function.

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