Skip to main content
100%

Shapes with SVG

✓ Published2🌍 Public
Uujjwalgarad
Last edited Dec 8, 2020
Created on Dec 4, 2020
Forked from Shapes with SVG

This example displays a horizontal bar chart of population data for ten countries, with bars rendered as SVG rectangles. The visualization uses D3 v6 scales (`scaleLinear` for the x-axis and `scaleBand` for the y-axis) to position the bars, and employs `axisLeft` and `axisBottom` to generate the axes. The data is loaded from a CSV file using `d3.csv`, and the values are explicitly converted to numbers before rendering. The chart area is inset with margins and a group translation, with bars styled in a solid steelblue color.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes