Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Refactored bar chart

Public visualization

Viewing a saved revision (read-only)

ae7584691e4f40389559a1a49738a00e

Refactored bar chart

0 stars1🌍 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