Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
LLewis Ward
Last edited Jul 25, 2021
Created on Jun 27, 2021

This horizontal bar chart displays the population of five countries using D3’s `scaleBand` and `scaleLinear` utilities within a React component. The SVG rendering separates axes and marks into reusable modules (`AxisBottom`, `AxisLeft`, `Marks`), while `useData` fetches a CSV via D3’s `csv` and formats values with `format(".2s")`. The visualization retrieves data from a GitHub gist, applying a Poppins font and a teal fill to the bars.

AI-generated description

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

MIT Licensed

Similar vizzes