Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Making a bar chart

0 stars1🌍 Public
JJuyeonee
Last edited Aug 9, 2021
Created on Aug 9, 2021

This example shows a horizontal bar chart of population estimates for the ten most populous countries, scaled in thousands. The visualization uses D3 v7 with an SVG renderer, loading data from a CSV file and encoding population with a linear scale and country names with a band scale. The code imports specific D3 modules like `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct axes, while bars are appended as SVG `rect` elements with steelblue fill.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed