Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a barchart

Public visualization

Viewing a saved revision (read-only)

98d169c7fe644ac984f5cbfbaad05292

Making a barchart

0 stars0🌍 Public
JJake
Last edited Jun 6, 2020
Created on Jun 6, 2020
Forked from Making a barchart

This example shows a horizontal bar chart ranking the populations of ten countries, from China at the top to Mexico at the bottom, scaled to thousands. The visualization uses D3 v5’s `csv` loader to parse the data, `scaleBand` for the y-axis categories, `scaleLinear` and `max` for the x-axis magnitude, and `axisLeft`/`axisBottom` for the ticks. Bars are rendered as SVG `<rect>` elements with a steelblue fill, positioned within a margin-based coordinate system.

AI-generated description