Margin Convention
✓ Published1🌍 Public
This example shows a simple horizontal bar chart of the ten most populous countries, using data from the United Nations World Population Prospects 2019 dataset. The chart displays population values for 2020 as bars, with country names on the y-axis and a linear population scale on the x-axis. The visualization uses React to render SVG elements, while D3’s `csv`, `scaleBand`, `scaleLinear`, and `max` functions handle data parsing, scaling, and domain calculations. A fixed margin of 20 pixels on all sides positions the chart within a 960-by-500 pixel SVG canvas.
AI-generated descriptionMaking a simple bar chart using data from United Nations World Population Prospects 2019 Dataset.
MIT Licensed