Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
SSonja Ek
Last edited Jun 3, 2021
Created on Jun 3, 2021

This example presents a horizontal bar chart showing the population of the top 10 countries from a UN Population dataset. The chart uses React components to render SVG elements, with D3’s `scaleBand` for the categorical country axis and `scaleLinear` for the numeric population axis. The visualization is split into modular components, including `AxisBottom`, `AxisLeft`, and `Marks`, which draw the ticks and rectangles. Data is loaded asynchronously via `d3.csv`, and the chart updates upon data arrival.

AI-generated description

A program that loads in some data and creates a bar chart with margins, info texts and ticks.

MIT Licensed

Similar vizzes