Skip to main content
100%

Refactored bar chart

✓ Published1🌍 Public
Aafcchilders
Last edited Nov 17, 2022
Created on Jan 14, 2022
Forked from Axes with React

This example shows a horizontal bar chart of population data for the top 10 countries in 2020, sourced from a CSV file via `d3.csv`. The visualization is built with React components, using `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis, rendered as SVG rectangles. The chart is refactored into modular functions for the axes and marks, with data loading handled by a custom `useData` hook that parses the population field.

AI-generated description

A program that loads in some data about CSS colors

MIT Licensed

Similar vizzes