Skip to main content
100%

Pathetic Bar Chart

✓ Published1🌍 Public
MMadNietzsche
Last edited Jul 29, 2021
Created on Jul 28, 2021

This example shows a horizontal bar chart of the top 10 most populous countries in 2020, with the bars rendered as plain rectangles without any styling. It loads population data from a CSV file using `d3.csv`, then uses React's `useState` and `useEffect` to fetch and store the data. The chart maps country names to the y-axis with `d3.scaleBand` and population values to the x-axis with `d3.scaleLinear`, drawing SVG `<rect>` elements within a React component that renders to a fixed-width SVG canvas.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state as a Radar Burst

MIT Licensed

Similar vizzes