Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
d3-canvas-zoom-04
const zoom_function = d3.zoom().scaleExtent([1, 1000])
.on('zoom', () => {
const transform = d3.event.transform;
context.save();
draw(transform);
context.restore();
});
canvasChart.call(zoom_function);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment