dv2020-ep22-viz22 - bar chart, axes
✓ Published1🌍 Public
Zzach b.
Last edited Mar 15, 2023
Created on Mar 15, 2023
Forked from dv2020-ep22-viz21 - bar chart, margin convention
A horizontal bar chart displays the top five most populous countries in 2020, sorted in descending order. The visualization uses d3.csv to load UN World Population Prospects 2019 data, then applies d3.scaleBand for the categorical y-axis and d3.scaleLinear with d3.max for the quantitative x-axis. React manages the component state, while SVG renders the ticks, gridlines, text labels, and rectangles. The background is set to a light yellow-green, with margins positioning the plot area.
AI-generated descriptionMIT Licensed