Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data with React & D3 - style barchart Axis

Public visualization

Viewing a saved revision (read-only)

89c2c14c744041b5b05c64696757c67f

Rendering Data with React & D3 - style barchart Axis

0 stars1🌍 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.