Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
CCHOI SEUNG HYUN
Last edited May 18, 2022
Created on May 18, 2022
Forked from Margins and Axes

This example shows a horizontal bar chart of the top 10 countries by population for 2020, rendered as SVG via React components. It loads CSV data from a GitHub-hosted file using D3’s `csv` utility, then defines separate axis and mark components (`AxisBottom`, `AxisLeft`, `Marks`) that leverage D3’s `scaleBand` and `scaleLinear` for positioning. The chart uses React’s state and `useData` hook to fetch and transform the data, displaying a loading message until the data arrives.

AI-generated description

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

MIT Licensed

Similar vizzes