Skip to main content
100%

Bar Chart with Basic Hover

✓ Published1🌍 Public
JJingxuan Yang
Last edited Feb 21, 2024
Created on Feb 21, 2024

The chart displays the top 10 houses by living area in square feet, sorted descending using D3's `descending` comparator. When a user hovers over a bar, it turns black while others gray, implemented via D3's `on('mouseenter')` and `on('mouseleave')` events that update the state. Using `observeResize` for responsive dimensions and `scaleBand`/`scaleLinear` from D3, the data comes from the `@RenoBlitz/dataset01` source with `sqft_living` as the plotted column.

AI-generated description

Challenge

  • Add this interaction to a bar chart or other visualization that you have created
MIT Licensed

Similar vizzes