Add Interaction OR Iterate Your Work
✓ Published0🌍 Public
This interactive scatterplot shows the relationship between number of bedrooms and living area (sqft) for homes in a dataset. Hovering over the plot draws crosshair lines from the cursor to the chart’s margins, while the current mouse coordinates are tracked in state. The visualization uses D3’s `pointer` event handling and `ResizeObserver` to adapt to container size, with axes rendered via `axisBottom` and `axisLeft` from D3. The code structure emphasizes modular, iterable components for axes, labels, and rendering.
AI-generated descriptionAdding a hover effect to the inner rectangle to extend lines from the cursor to the axes.
Challenge
- Show the hovered numbers in place of tick marks on the axes themselves.
MIT Licensed