Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored Bar Chart

Public visualization

Viewing a saved revision (read-only)

feead6498c6d49ca8f49328d5d6d52ac

Refactored Bar Chart

0 stars1🌍 Public
NNarottam Medhora
Last edited Apr 6, 2022
Created on Mar 22, 2022
Forked from Margins and Axes

This example shows a horizontal bar chart displaying the top 10 regions by population for 2020, using a dataset loaded from a CSV file via D3’s `csv` utility. React components, including `AxisBottom`, `AxisLeft`, and `Marks`, render the SVG axes and rectangles. The chart uses `scaleBand` for the categorical y-axis and `scaleLinear` for the population x-axis, with React’s `useState` and `useEffect` managing asynchronous data loading. The visualization demonstrates a modular, refactored approach to building interactive charts with D3 scales and React rendering.

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!