Skip to main content
100%

hover to select d3

✓ Published0🌍 Public
RRITUZZ
Last edited Jan 28, 2021
Created on Jan 28, 2021
Forked from click to select d3

This example demonstrates an interactive fruit bowl visualization where hovering over circles selects them, highlighting the chosen fruit with a black stroke. The code loads D3 v6 via UNPKG and uses local ES6 modules, with `fruitBowl.js` defining a reusable chart function that leverages `scaleOrdinal` for color and radius mapping. Data comes from `data.csv`, though the visualization primarily uses generated fruit objects. SVG circles transition smoothly between states using `transition().duration(1000)`, while mouse events trigger state changes and re-rendering. The example also shows enter, update, and exit selections as fruits are dynamically removed or modified over time.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes