From b1a7d2211c2e5f9dca7c3425439f2b273aba3b89 Mon Sep 17 00:00:00 2001 From: tubaxenor Date: Mon, 15 Jul 2013 15:26:37 +0800 Subject: [PATCH] add brushExtent to chart to enable the ability to set default focus range. There is a brushExtent when init, so I guess maybe you guys just forgot to put the public function available. --- src/models/lineWithFocusChart.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/models/lineWithFocusChart.js b/src/models/lineWithFocusChart.js index abfc649..cf8f3d8 100644 --- a/src/models/lineWithFocusChart.js +++ b/src/models/lineWithFocusChart.js @@ -1,4 +1,3 @@ - nv.models.lineWithFocusChart = function() { //============================================================ @@ -552,6 +551,12 @@ nv.models.lineWithFocusChart = function() { y2Axis.tickFormat(_); return chart; }; + + chart.brushExtent = function(_) { + if (!arguments.length) return brushExtent; + brushExtent = _; + return chart; + }; //============================================================