block by micahstubbs 1408d5353c97e4e1275f15dc85e1de98

d3-voronoi-scatterplot chart component

Full Screen

a work-in-progress example created with the nascent d3-voronoi-scatterplot chart component

re-usable stuff is hard πŸ˜…

β€”β€” 8X ——–

this but ES2015

β€”β€” 8X ——–

love that bootstrap popover tooltip but regret that jQuery depedency? this is the iteration for you.

enter bootstrap-native, a Vanilla JavaScript replacement for bootstrap

this example uses a fork of bootstrap native with improved error handling

removeTooltip.js and showTooltip.js code ported back to ES5 with https://babeljs.io/repl/

a fork of @micahstubbsβ€˜s block Voronoi Scatterplot with diagram.find()

β€”β€” 8X ——–

this example uses the diagram.find() convention introduced in d3 version 4.3.0

a fork of Philippe RiviΓ¨reβ€˜s block Nadieh Bremer’s Scatterplot with Voronoi - ported to d3.v4, and no SVG overlay

β€”β€” 8X ——–

This is a D3.v4 port by Philippe RiviΓ¨re of Nadieh Bremerβ€˜s block: Step 6 - Final - Voronoi (Distance Limited Tooltip) Scatterplot.

In addition, we use d3.voronoi.find(x,y,radius) to locate the point, instead of relying on a SVG overlay of clipped circles.

This gives:

1) lazy computation of the Voronoi 2) other objects are allowed capture the mouse before svg.

β€”β€” 8X ——–

Nadieh:

This scatterplot is part of the extension of my blog on Using a D3 Voronoi grid to improve a chart’s interactive experience. After writing that blog Franck Lebeau came with another version which uses large circles to define the tooltip region. I thought this was a great idea! But I made this variation on his code, because I felt that the extra code used in this example (versus the previous version 4) is more in line with the rest of the code.

The tooltip now reacts when you hover over an invisible large circular region around each circle.

You can find all of the steps here

forked from Filβ€˜s block: Step 6 - d3.v4 [UNLISTED]

index.html