Skip to main content
100%

Axes with D3 React

✓ Published1🌍 Public
MMarco Malvicini
Last edited Apr 17, 2021
Created on Apr 17, 2021
Forked from D3 React bar chart

This example demonstrates a horizontal bar chart of United Nations population data for 2020, using D3.js scales and React state management. It loads a CSV dataset with `d3.csv`, stores the parsed data in React's `useState` hook, and renders SVG bars with `d3.scaleBand` and `d3.scaleLinear`. Custom axes are drawn manually by mapping ticks from the scales, showing D3's utility functions integrated with React's component lifecycle. The chart displays the top ten countries by population, with axes labeled using SVG text elements.

AI-generated description

A program that loads in some data using d3 utilities and use react state to store the data

MIT Licensed

Similar vizzes