Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart/Customizing Axis

Public visualization

Making a Bar Chart/Customizing Axis

0 stars1🌍 Public
Aadelgrosso
Last edited Aug 18, 2021
Created on Aug 18, 2021

This example displays a horizontal bar chart of the top 10 most populous countries, using population data loaded from a CSV file. The chart customizes its axes, removing domain lines and using a D3 formatter to abbreviate large population numbers, such as converting billions to "B". The code relies on D3 v7 modules including `scaleBand`, `scaleLinear`, `axisLeft`, and `axisBottom`. SVG rectangles are drawn to represent each bar, with the chart rendered entirely through D3’s data join and SVG manipulation.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed