Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
Jjwlam83
Last edited Jan 13, 2022
Created on Jan 13, 2022

This example shows a horizontal bar chart of the top ten most populous countries in 2020, using data loaded from a CSV file via `d3.csv`. React renders the SVG elements, while scales from D3 (`scaleBand`, `scaleLinear`) position the bars and axes. Manual axis construction uses `xScale.ticks()` and `yScale.domain()` to generate grid lines and tick labels, with country names and population values mapped to rectangular `rect` elements.

AI-generated description

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

MIT Licensed

Similar vizzes