Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
HHollyClarke19
Last edited Feb 7, 2021
Created on Feb 7, 2021

This example shows a horizontal bar chart ranking the top 10 countries by projected 2020 population, with SVG rendering driven by React’s declarative component model. D3 utilities—`csv` for loading the UN population dataset, `scaleBand` and `scaleLinear` for positioning bars, and `max` for domain computation—prepare the scales, while React maps the data to `<rect>` and `<text>` elements. The chart also displays x-axis tick lines and labels derived from `xScale.ticks()`, with margins applied via an SVG `<g>` transform.

AI-generated description

A program that loads in some data about css named colours using d3 utilities, and uses React to render the data and D3 to format as a radial burst

MIT Licensed

Similar vizzes