Skip to content

Instantly share code, notes, and snippets.

@nautilytics
Created January 2, 2020 15:56
Show Gist options
  • Save nautilytics/912014fe372c9342354543e3b442f6ca to your computer and use it in GitHub Desktop.
Save nautilytics/912014fe372c9342354543e3b442f6ca to your computer and use it in GitHub Desktop.
Using d3.transition.
const markers = d3.selectAll(‘.marker’)
.data(data, d => d.id)
.enter()
.append(‘circle’)
.attr(‘class’, ‘marker’)
.attr(‘r’, 7.5)
.transition()
.duration(1000)
.attr(‘cx’, d => d.x)
.attr(‘cy’, d => d.y);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment