🌍 Public
Viewing a saved revision (read-only)
b2f2549e457149b0ac16887ae2566d85
question1(Activity6)
This example shows a horizontal bar chart comparing the population of 10 countries in the year 2000, using hardcoded data. The bars are rendered as SVG rectangles, with value labels placed at the end of each bar and formatted using `d3.format('.2s')`. The chart uses `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis, with axes generated via `d3.axisLeft` and `d3.axisBottom`. Bars are styled with a CSS hover effect that changes their fill color to orange.
AI-generated description