Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
Nnpelliccia
Last edited Aug 24, 2021
Created on Aug 4, 2021

This example shows a horizontal bar chart of the top ten countries by population in 2020, fetched from a CSV file via `d3.csv` and rendered as SVG using React. The chart employs `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis. A bottom axis renders grid lines and tick labels, while a left axis displays country names. Refactored into separate components (`AxisBottom`, `AxisLeft`, `Marks`), it demonstrates a modular approach to building interactive data visualizations with React and D3 v5.

AI-generated description

A program that loads CSV data into react and renders the data

MIT Licensed

Similar vizzes