Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

The Margin Convention

Public visualization

The Margin Convention

0 stars1๐ŸŒ Public
Gguptambergatech
Last edited Jan 9, 2022
Created on Jan 9, 2022

This example demonstrates a horizontal bar chart of the top 10 most populous countries using UN population data from 2019. It applies the margin convention by defining a margin object and translating the chart group accordingly, ensuring axes and labels have space. The visualization uses React for component rendering and D3 v7 APIs including `scaleBand`, `scaleLinear`, and `max` to map data to SVG rectangles. Populated via `d3.csv`, the chart updates when data loads, with the SVG sized to the full window.

AI-generated description

Smiley face implementation with React.

Comments

Sign in to join the discussion.

MIT Licensed