I'm usuing the lineWithFocusChart.js model shown in the nvd3 examples shown here: http://nvd3.org/ghpages/examples.html
I want to be able to choose a specific x range for the graph to be focused on at load. I thought there would be a variable in chart that I could set to accomplish this.
chart.brush.extent([x0,x1])
wherex0
andx1
are the values you want the ends of the brush to start on. See github.com/novus/nvd3/blob/master/nv.d3.js line 4908 to see that the brush is ad3.svg.brush()
, and see github.com/mbostock/d3/wiki/SVG-Controls#brush to see what all you can do to a d3 brush. – Stonyhearted