Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
d3-canvas-zoom-06
const toolsList = container.select('.tools')
.style('margin-top', margin.top + 'px')
.style('visibility', 'visible');
toolsList.select('#reset').on('click', () => {
const t = d3.zoomIdentity.translate(0, 0).scale(1);
canvasChart.transition()
.duration(200)
.ease(d3.easeLinear)
.call(zoom_function.transform, t)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment