Skip to main content
100%

Shapes and Colors with SVG and CSS

✓ Published1🌍 Public
OOsekovS
Last edited Aug 17, 2020
Created on Aug 12, 2020

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 description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes