Created
April 26, 2018 19:03
-
-
Save xoor-io/2dbf075a8d9ee5b50cf78931734d3852 to your computer and use it in GitHub Desktop.
d3-canvas-brush-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 brush = d3.brush().extent([[0, 0], [width, height]]) | |
.on("start", () => { brush_startEvent(); }) | |
.on("brush", () => { brush_brushEvent(); }) | |
.on("end", () => { brush_endEvent(); }) | |
.on("start.nokey", function() { | |
d3.select(window).on("keydown.brush keyup.brush", null); | |
}); | |
const brushSvg = svgChart | |
.append("g") | |
.attr("class", "brush") | |
.call(brush); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment