Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of bar_char 2

Public visualization

Viewing a saved revision (read-only)

bf6e75892b5846ea99cb7e7e87705ef6

Fork of bar_char 2

0 stars1🌍 Public
TTanupat B.
Last edited Mar 19, 2022
Created on Mar 19, 2022
Forked from bar_char

This example visualizes the population of ten countries in 2020 using horizontal bars in an SVG rendered by React. It loads data from a CSV file via D3’s `csv` utility, parses the population column, and stores it in React state. A D3 `scaleBand` positions each country along the y-axis, while a `scaleLinear` maps population values to bar widths, with margins applied to the chart layout.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.