Skip to main content
100%

Ep23 Refactored Bar Chart

✓ Published1🌍 Public
SStoo Sepp
Last edited Oct 30, 2021
Created on Oct 30, 2021

This example displays a horizontal bar chart of the top 10 countries by population in 2020, according to UN data loaded from a CSV file. Built with React and D3 v7, the chart is rendered as SVG. The code constructs the visualization using modular components, with `AxisBottom` generating the quantitative scale ticks, `AxisLeft` labeling the categorical country names, and `Marks` drawing the bars. The `useData` hook fetches the data, while `scaleBand` and `scaleLinear` handle the layout.

AI-generated description

a program that loads in data about CSS Named Colours using d3 with useState hook to update

MIT Licensed

Similar vizzes