From be79d229c76946257d97e85cc2a0de9d293f1bae Mon Sep 17 00:00:00 2001 From: blcook223 Date: Sat, 14 Feb 2015 14:42:29 -0600 Subject: [PATCH] removed range selector mini plot gradient color option to avoid conflict with PR #314 --- auto_tests/tests/range_selector.js | 1 - dygraph-options-reference.js | 6 ------ dygraph-utils.js | 1 - dygraph.js | 1 - plugins/range-selector.js | 4 +--- 5 files changed, 1 insertion(+), 12 deletions(-) diff --git a/auto_tests/tests/range_selector.js b/auto_tests/tests/range_selector.js index 29a6709..67d76cc 100644 --- a/auto_tests/tests/range_selector.js +++ b/auto_tests/tests/range_selector.js @@ -142,7 +142,6 @@ RangeSelectorTestCase.prototype.testAdditionalRangeSelectorOptions = function() rangeSelectorBGStrokeColor: 'blue', rangeSelectorBGLineWidth: 3, rangeSelectorPlotLineWidth: 0.5, - rangeSelectorPlotGradientColor: 'gray', rangeSelectorFGStrokeColor: 'red', rangeSelectorFGLineWidth: 2, rangeSelectorAlpha: 0.8, diff --git a/dygraph-options-reference.js b/dygraph-options-reference.js index 11c1236..26bb22b 100644 --- a/dygraph-options-reference.js +++ b/dygraph-options-reference.js @@ -757,12 +757,6 @@ Dygraph.OPTIONS_REFERENCE = // "type": "float", "description": "The width of the range selector mini plot line." }, - "rangeSelectorPlotGradientColor": { - "default": "white", - "labels": ["Interactive Elements"], - "type": "string", - "description": "The color that along with rangeSelectorPlotFillColor defines the linear gradient in the range selector mini plot. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\". You can also specify \"\" to turn off gradient." - }, "rangeSelectorFGStrokeColor": { "default": "black", "labels": ["Interactive Elements"], diff --git a/dygraph-utils.js b/dygraph-utils.js index 767fe64..4f782b1 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -906,7 +906,6 @@ var pixelSafeOptions = { 'rangeSelectorBGStrokeColor': true, 'rangeSelectorBGLineWidth': true, 'rangeSelectorPlotLineWidth': true, - 'rangeSelectorPlotGradientColor': true, 'rangeSelectorFGStrokeColor': true, 'rangeSelectorFGLineWidth': true, 'rangeSelectorAlpha': true, diff --git a/dygraph.js b/dygraph.js index acbcbe3..35f2b5f 100644 --- a/dygraph.js +++ b/dygraph.js @@ -340,7 +340,6 @@ Dygraph.DEFAULT_ATTRS = { rangeSelectorBGStrokeColor: "gray", rangeSelectorBGLineWidth: 1, rangeSelectorPlotLineWidth:1.5, - rangeSelectorPlotGradientColor: "white", rangeSelectorFGStrokeColor: "black", rangeSelectorFGLineWidth: 1, rangeSelectorAlpha: 0.6, diff --git a/plugins/range-selector.js b/plugins/range-selector.js index fea0cf3..f9d4193 100644 --- a/plugins/range-selector.js +++ b/plugins/range-selector.js @@ -547,8 +547,6 @@ rangeSelector.prototype.drawMiniPlot_ = function() { if (!fillStyle && !strokeStyle) { return; } - var gradientFillStyle = this.getOption_('rangeSelectorPlotGradientColor'); - if (!gradientFillStyle) { gradientFillStyle = fillStyle; } var stepPlot = this.getOption_('stepPlot'); @@ -610,7 +608,7 @@ rangeSelector.prototype.drawMiniPlot_ = function() { if (fillStyle) { var lingrad = this.bgcanvas_ctx_.createLinearGradient(0, 0, 0, canvasHeight); - lingrad.addColorStop(0, gradientFillStyle); + lingrad.addColorStop(0, 'white'); lingrad.addColorStop(1, fillStyle); this.bgcanvas_ctx_.fillStyle = lingrad; ctx.fill(); -- 2.7.4