Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes with SVG

Public visualization

Viewing a saved revision (read-only)

687a8baa8cdb4863a044dc8c968722e6

Shapes with SVG

0 stars2🌍 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.