Skip to content

Commit 153163a

Browse files
authored
Merge pull request #1837 from billderose/fix/1243
Fix 1243: LineWithFocus: chart doesn't update if the focus area is less than 1 even if chart is all decimals
2 parents 937ec2a + 9f4f0e8 commit 153163a

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/models/focus.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,7 @@ nv.models.focus = function(content) {
105105

106106
brush.on('brushend', function () {
107107
if (!syncBrushing) {
108-
var extent = brush.empty() ? x.domain() : brush.extent();
109-
if (Math.abs(extent[0] - extent[1]) <= 1) {
110-
return;
111-
}
112-
dispatch.onBrush(extent);
108+
dispatch.onBrush(brush.empty() ? x.domain() : brush.extent());
113109
}
114110
});
115111

@@ -214,12 +210,6 @@ nv.models.focus = function(content) {
214210
function onBrush(shouldDispatch) {
215211
brushExtent = brush.empty() ? null : brush.extent();
216212
var extent = brush.empty() ? x.domain() : brush.extent();
217-
218-
//The brush extent cannot be less than one. If it is, don't update the line chart.
219-
if (Math.abs(extent[0] - extent[1]) <= 1) {
220-
return;
221-
}
222-
223213
dispatch.brush({extent: extent, brush: brush});
224214
updateBrushBG();
225215
if (shouldDispatch) {

0 commit comments

Comments
 (0)