Making a Bar Chart
A horizontal bar chart compares population estimates for thirteen world regions, with bar lengths scaled proportionally and fill colors transitioning from IndianRed to Red based on value. The visualization uses d3.csv, d3.scaleLinear, d3.scaleBand, d3.axisLeft, and d3.axisBottom. A green clickable circle toggles an animated width transition via d3.transition, shrinking or growing all bars simultaneously. Hovering over a bar updates a foreignObject div with the region name and population, while data originates from the 2017 United Nations World Population Prospects.