Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
RRMartins11
Last edited May 4, 2021
Created on May 4, 2021

This example shows a horizontal bar chart of population data for the top 10 countries in 2020, rendered as SVG using React components. D3 utilities load the CSV dataset and compute scales, while React handles the rendering of axes, tick labels, and bars. The code explicitly builds the x-axis with `xScale.ticks()` and gridlines, and the y-axis from `scaleBand` domains, using `d3.csv`, `scaleLinear`, and `scaleBand` from d3 v6. Data comes from a UN Population 2019 CSV file loaded via a gist URL.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst.

MIT Licensed

Similar vizzes