Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
Vvangenned
Last edited Aug 15, 2022
Created on Aug 15, 2022

This example presents a horizontal bar chart of the top ten countries by 2020 population, sourced from a UN population dataset. It demonstrates a modular code organization using React components for the bottom axis, left axis, and the rectangular marks, each rendered with SVG. The chart specifically uses D3's `scaleBand` and `scaleLinear` to map the data to pixel coordinates, while the React `useData` hook fetches and parses the CSV file. The bars are scaled proportionally to each country's population value.

AI-generated description

A program that loads in some data about CSS named colours with d3 and uses react to reder data

MIT Licensed

Similar vizzes