Skip to main content
100%

Refactored bar chart

✓ Published0🌍 Public
Gguptambergatech
Last edited Jan 9, 2022
Created on Jan 9, 2022

This example shows a horizontal bar chart of the top 10 countries by population for 2020, with bars extending from a shared baseline and labeled axes. It is built as a React application that uses D3 v7’s `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The chart is rendered as SVG, with axes and marks split into reusable components (`AxisBottom`, `AxisLeft`, `Marks`), and data is loaded asynchronously from a CSV via `d3.csv`.

AI-generated description

Smiley face implementation with React.

MIT Licensed

Similar vizzes