Skip to content

Instantly share code, notes, and snippets.

@levvsha
Last active February 4, 2018 16:18
Show Gist options
  • Select an option

  • Save levvsha/1d08ec46d11aa7a5086306e9e803c6b4 to your computer and use it in GitHub Desktop.

Select an option

Save levvsha/1d08ec46d11aa7a5086306e9e803c6b4 to your computer and use it in GitHub Desktop.
const lineGenerator = d3.line()
.x(d => rescaledX(d.date))
.y(d => y(d.percent))
.curve(d3.curveCardinal);
/* ... */
function voronoiMouseover(d) {
/* ... */
hoverDot
.attr('cx', () => rescaledX(d.data.date))
.attr('cy', () => rescaledY(d.data.percent));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment