Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Population Bar Chart with Margin with Axes

Public visualization

Population Bar Chart with Margin with Axes

0 stars1🌍 Public
Nnicklaus-roy
Last edited Apr 12, 2021
Created on Apr 12, 2021

A horizontal bar chart displays the ten most populous countries based on United Nations 2020 estimates, with population values plotted along a linear x-axis and country names along a band y-axis. The React component loads CSV data via `d3.csv`, then renders SVG rectangles and axis tick labels using `scaleLinear`, `scaleBand`, and `max` from D3 v6. The chart applies explicit margins to position axes, which are manually constructed from `xScale.ticks()` and `yScale.domain()` rather than using D3's axis generators.

AI-generated description

Smiley face implementation with React.

Comments

Sign in to join the discussion.

MIT Licensed