Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a bar chart

Public visualization

Making a bar chart

0 stars0🌍 Public
Uuskh580e
Last edited Jan 29, 2023
Created on Jan 28, 2023

This example shows a horizontal bar chart of the ten most populous countries, with bar widths proportional to each nation’s population (displayed in thousands). The visualization is built with D3 v5, using `scaleLinear` for the x-axis and `scaleBand` for the y-axis, rendering rectangles as SVG elements. Data is loaded from a CSV file via `d3.csv`, with population values parsed and multiplied by 1000 before the chart is drawn.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed