Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Fork of refactoring bar chart with react and d3

Public visualization

Fork of refactoring bar chart with react and d3

0 stars0๐ŸŒ Public
Mmeghshah612
Last edited Feb 21, 2022
Created on Feb 20, 2022

This interactive bar chart displays population data for ten countries, sourced from a CSV file, using horizontal bars to encode each country's population value. Built with React and D3.js v7, the visualization renders entirely as SVG elements, with the `AxisBottom`, `AxisLeft`, and `Marks` components constructing the tick marks, axis labels, and rectangular bars. The chart uses D3's `scaleBand` for the categorical country axis and `scaleLinear` for the numeric population axis, while React's `useState` and `useEffect` hooks manage asynchronous data loading.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed