Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with React & D3

Public visualization

Viewing a saved revision (read-only)

7e655cc11692472a9175cce81b80e722

Axes with React & D3

0 stars1🌍 Public
PPeter Krevenets
Last edited Mar 14, 2021
Created on Mar 14, 2021

A horizontal bar chart displays the 11 most populous countries in 2020, using United Nations World Population Data 2019. React manages the component state, loading the CSV via `d3.csv` and sorting/slicing the data. D3’s `scaleBand` and `scaleLinear` position the bars, while custom SVG groups render tomato-colored gridlines and axis tick labels from `xScale.ticks()`. All marks are drawn as SVG elements within a translated `<g>` group, using margins to align the chart.

AI-generated description

Using United Nations World Population Data 2019 and React to render a bar chart with margins.