🌍 Public
Viewing a saved revision (read-only)
9da313d8e20d42ec9895cfbafb8cd6c3
Fork of Bar Chart with Basic Hover
This example shows the top 10 most populous countries as a bar chart, highlighting the selected bar in black while graying out the others when hovered. It uses D3.js `scaleBand` and `scaleLinear` for positioning, with mouseenter and mouseleave events updating the chart’s state. The data comes from the UN population estimates, rendered in SVG with responsive axes and resizable dimensions.
AI-generated descriptionChallenge
- Add this interaction to a bar chart or other visualization that you have created