Skip to main content
100%

The MArgin convention

✓ Published1🌍 Public
Jjackcaldwellnichols
Last edited Nov 8, 2023
Created on Nov 8, 2023

This example displays a bar chart comparing the 2020 population of ten countries from a UN population prospects dataset. Each bar’s width is proportional to the country’s population, and the countries are arranged vertically using a band scale. The visualization is rendered with React and SVG, using D3 v7’s `scaleBand` and `scaleLinear` to map data to coordinates, and D3’s `csv` loader to fetch and parse the remote data. The code shows a fixed chart size with a 20-pixel margin on each side.

AI-generated description

Rendering the CSV colors in react

MIT Licensed

Similar vizzes