Skip to main content
100%

Rendering Data with React & D3 - style barchart Axis

✓ Published1🌍 Public
Kkeitheade
Last edited Nov 4, 2021
Created on Nov 4, 2021

This example renders a horizontal bar chart showing the top 10 countries by 2020 population from a UN dataset, styled with React components and D3 scales. The custom `AxisBottom` and `AxisLeft` components use `d3.scaleBand` and `d3.scaleLinear` to position ticks, while `Marks` draws the rectangular bars in SVG. Data is loaded via `d3.csv`, and the chart displays population values with a tick format that converts gigabytes to billions.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes