This examples demonstrates how to use D3's brush component to implement focus + context zooming. Click and drag in the small chart below to pan or zoom.
See Results at http://bl.ocks.org/1671866
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
//Simple d3.js barchart example to illustrate d3 selections | |
//other good related tutorials | |
//http://www.recursion.org/d3-for-mere-mortals/ | |
//http://mbostock.github.com/d3/tutorial/bar-1.html | |
var w = 850 | |
var h = 400 | |
var bars = function(data) |