From 9fa0b63686bd37ca1c48f36cb355a172edd384ac Mon Sep 17 00:00:00 2001 From: Justin Turner Arthur Date: Thu, 5 Sep 2013 22:02:55 -0500 Subject: [PATCH] Remove setup of `singlePoint` variable that is not used in some of the bar models. Additionally, this variable was being assigned as a property on the global object (`window` in browsers) instead of being declared locally with a `var` statement. --- src/models/multiBarTimeSeries.js | 1 - src/models/ohlcBar.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/models/multiBarTimeSeries.js b/src/models/multiBarTimeSeries.js index 35ac726..8c1f75b 100644 --- a/src/models/multiBarTimeSeries.js +++ b/src/models/multiBarTimeSeries.js @@ -79,7 +79,6 @@ nv.models.multiBarTimeSeries = function() { // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point - if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true; if (x.domain()[0] === x.domain()[1]) x.domain()[0] ? x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01]) diff --git a/src/models/ohlcBar.js b/src/models/ohlcBar.js index ef1da05..46f2b60 100644 --- a/src/models/ohlcBar.js +++ b/src/models/ohlcBar.js @@ -64,7 +64,6 @@ nv.models.ohlcBar = function() { .range(yRange || [availableHeight, 0]); // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point - if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true; if (x.domain()[0] === x.domain()[1]) x.domain()[0] ? x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])