🌍 Public
Viewing a saved revision (read-only)
175bf8b05aee46b38ecde5a57fe6be66
Shapes and Colors with SVG and CSS
This example shows a horizontal bar chart of population data for ten countries, using SVG rectangles rendered with D3 v5. The visualization scales bar lengths with `d3.scaleLinear` and spaces categories using `d3.scaleBand`, while `d3.axisBottom` and `d3.axisLeft` provide labeled axes. CSS styles the bars in pink, and the code reads from a CSV file, formats tick labels with `d3.format`, and logs clicked elements to the console.
AI-generated descriptionAn example including some commonly used features of SVG.