View slider.js
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 slider control in D3js. | |
// Based on Mike Bostock's example | |
// http://bl.ocks.org/mbostock/6452972 | |
// Slider in D3 | |
function makeSlider(label, x,y,scale,cb) { | |
var brush = d3.svg.brush() | |
.x(scale) | |
.extent([0,0]) | |
.on("brush", brushed); |