Last active
April 10, 2018 19:14
-
-
Save xoor-io/fc4419cc9fc5c57b046830afa42e88db to your computer and use it in GitHub Desktop.
d3-canvas-zoom-04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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