question1(Activity6)
✓ Published0🌍 Public
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 descriptionMIT Licensed