task 9&10
This horizontal stacked bar chart displays the population of countries in millions, sourced from the covidandworldpopulation.csv dataset. The visualization uses d3-scale's `scaleBand` for the y-axis and `scaleLinear` for the x-axis, with `d3.stack` to create the bar segments. A color legend built with `scaleOrdinal` and `schemeCategory10` allows interactive highlighting, where hovering over a legend item fades non-matching bars and raises the selected stack using `raise()`.
AI-generated descriptionGraph Overview
Type: Horizontal Bar Chart Purpose: Displays the population of various countries measured in millions. Orientation: Countries with smaller populations are at the top, and those with larger populations are at the bottom.
Data Representation
X-Axis: Represents population figures, ranging from 0 to 1,400 million. Y-Axis: Lists countries in descending order of population. Bars: The length of each bar indicates the country's population in million.