Skip to main content
100%

Making a varchart

✓ Published1🌍 Public
SSandraPicarra
Last edited Oct 17, 2020
Created on Oct 17, 2020
Forked from React Starter

This example shows a horizontal bar chart of country populations, with bars sized proportionally to each nation’s inhabitants. The chart uses D3 v6’s `scaleLinear` and `scaleBand` to map population values and country names to SVG rectangles, while a margin-based translation positions the chart within the viewport. Data is loaded from a CSV file via `d3.csv`, with population values converted to numbers and multiplied by 1000 before rendering. The visualization is built with React tooling, though the rendering itself relies on D3’s SVG selection and data-join methods.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes