Skip to main content
100%

Chart2.js

✓ Published0🌍 Public
Aacervantesc
Last edited Jul 26, 2022
Created on Jul 25, 2022

This example shows a horizontal bar chart of population data for 15 countries or regions, using bars scaled linearly to represent population values. The visualization is built with React and rendered as SVG, using D3 v5’s `scaleLinear` and `scaleBand` for positioning and sizing bars. The code loads data from a CSV file, multiplies population values by 1000 to convert them to raw numbers, and appends rectangles to the SVG. It highlights the simplest D3 approach for creating categorical comparisons.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes