Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Bar Chart with Basic Hover

Public visualization

Viewing a saved revision (read-only)

28fbe47586e843cbb685610842dda547

Fork of Bar Chart with Basic Hover

0 stars0🌍 Public
JJingxuan Yang
Last edited Feb 28, 2024
Created on Feb 28, 2024

A horizontal bar chart displays the top 10 house IDs by living area in square feet, sourced from the dataset01 module. The visualization uses d3.scaleBand and d3.scaleLinear to map categories and values, with axes rendered via the responsive-axes library. Hovering over a bar triggers a mouseenter event that appends a text label showing the exact data value and dims the bar, while mouseleave removes the label and restores opacity, using D3’s selection and state management for interaction.

AI-generated description

Challenge

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