Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with react D3

Public visualization

Axes with react D3

0 stars1🌍 Public
Jjiro2017
Last edited Sep 20, 2021
Created on Sep 20, 2021

This example shows a horizontal bar chart of the top 10 countries by population in 2020, using React to render SVG elements and D3 to handle data loading and scales. The code loads CSV data from a remote URL with `d3.csv`, then uses `scaleBand` for the country axis, `scaleLinear` for the population axis, and manually creates tick marks and labels for both axes. Each country is represented as a `rect` whose width corresponds to its population.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed