changed names of new range selector options: FG > Foreground, BG > Background
authorblcook223 <benjamin.l.cook@gmail.com>
Mon, 9 Mar 2015 04:46:03 +0000 (23:46 -0500)
committerblcook223 <benjamin.l.cook@gmail.com>
Mon, 9 Mar 2015 04:46:03 +0000 (23:46 -0500)
auto_tests/tests/range_selector.js
dygraph-options-reference.js
dygraph-utils.js
dygraph.js
plugins/range-selector.js

index 575cced..3349ab5 100644 (file)
@@ -140,11 +140,11 @@ RangeSelectorTestCase.prototype.testAdditionalRangeSelectorOptions = function()
     height: 320,
     showRangeSelector: true,
     rangeSelectorHeight: 30,
-    rangeSelectorBGStrokeColor: 'blue',
-    rangeSelectorBGLineWidth: 3,
+    rangeSelectorBackgroundStrokeColor: 'blue',
+    rangeSelectorBackgroundLineWidth: 3,
     rangeSelectorPlotLineWidth: 0.5,
-    rangeSelectorFGStrokeColor: 'red',
-    rangeSelectorFGLineWidth: 2,
+    rangeSelectorForegroundStrokeColor: 'red',
+    rangeSelectorForegroundLineWidth: 2,
     rangeSelectorAlpha: 0.8,
     labels: ['X', 'Y']
   };
index 57fbb97..d37251b 100644 (file)
@@ -745,13 +745,13 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
     "type": "string",
     "description": "The top color for the range selector mini plot fill color gradient. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"rgba(255,100,200,42)\" or \"yellow\". You can also specify null or \"\" to disable the gradient and fill with one single color."
   },
-  "rangeSelectorBGStrokeColor": {
+  "rangeSelectorBackgroundStrokeColor": {
     "default": "gray",
     "labels": ["Interactive Elements"],
     "type": "string",
     "description": "The color of the lines below and on both sides of the range selector mini plot. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\"."
   },
-  "rangeSelectorBGLineWidth": {
+  "rangeSelectorBackgroundLineWidth": {
     "default": "1",
     "labels": ["Interactive Elements"],
     "type": "float",
@@ -763,13 +763,13 @@ Dygraph.OPTIONS_REFERENCE =  // <JSON>
     "type": "float",
     "description": "The width of the range selector mini plot line."
   },
-  "rangeSelectorFGStrokeColor": {
+  "rangeSelectorForegroundStrokeColor": {
     "default": "black",
     "labels": ["Interactive Elements"],
     "type": "string",
     "description": "The color of the lines in the interactive layer of the range selector. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\"."
   },
-  "rangeSelectorFGLineWidth": {
+  "rangeSelectorForegroundLineWidth": {
     "default": "1",
     "labels": ["Interactive Elements"],
     "type": "float",
index f712650..eb08fef 100644 (file)
@@ -904,11 +904,11 @@ var pixelSafeOptions = {
   'rangeSelectorPlotFillColor': true,
   'rangeSelectorPlotFillGradientColor': true,
   'rangeSelectorPlotStrokeColor': true,
-  'rangeSelectorBGStrokeColor': true,
-  'rangeSelectorBGLineWidth': true,
+  'rangeSelectorBackgroundStrokeColor': true,
+  'rangeSelectorBackgroundLineWidth': true,
   'rangeSelectorPlotLineWidth': true,
-  'rangeSelectorFGStrokeColor': true,
-  'rangeSelectorFGLineWidth': true,
+  'rangeSelectorForegroundStrokeColor': true,
+  'rangeSelectorForegroundLineWidth': true,
   'rangeSelectorAlpha': true,
   'showLabelsOnHighlight': true,
   'showRoller': true,
index 1e1a270..49ae2e5 100644 (file)
@@ -338,11 +338,11 @@ Dygraph.DEFAULT_ATTRS = {
   rangeSelectorPlotStrokeColor: "#808FAB",
   rangeSelectorPlotFillGradientColor: "white",
   rangeSelectorPlotFillColor: "#A7B1C4",
-  rangeSelectorBGStrokeColor: "gray",
-  rangeSelectorBGLineWidth: 1,
+  rangeSelectorBackgroundStrokeColor: "gray",
+  rangeSelectorBackgroundLineWidth: 1,
   rangeSelectorPlotLineWidth:1.5,
-  rangeSelectorFGStrokeColor: "black",
-  rangeSelectorFGLineWidth: 1,
+  rangeSelectorForegroundStrokeColor: "black",
+  rangeSelectorForegroundLineWidth: 1,
   rangeSelectorAlpha: 0.6,
   showInRangeSelector: null,
 
index 2f5cdb7..4c1e938 100644 (file)
@@ -526,8 +526,8 @@ rangeSelector.prototype.drawStaticLayer_ = function() {
   }
 
   var margin = 0.5;
-  this.bgcanvas_ctx_.lineWidth = this.getOption_('rangeSelectorBGLineWidth');
-  ctx.strokeStyle = this.getOption_('rangeSelectorBGStrokeColor');
+  this.bgcanvas_ctx_.lineWidth = this.getOption_('rangeSelectorBackgroundLineWidth');
+  ctx.strokeStyle = this.getOption_('rangeSelectorBackgroundStrokeColor');
   ctx.beginPath();
   ctx.moveTo(margin, margin);
   ctx.lineTo(margin, this.canvasRect_.h-margin);
@@ -749,8 +749,8 @@ rangeSelector.prototype.drawInteractiveLayer_ = function() {
   var height = this.canvasRect_.h - margin;
   var zoomHandleStatus = this.getZoomHandleStatus_();
 
-  ctx.strokeStyle = this.getOption_('rangeSelectorFGStrokeColor');
-  ctx.lineWidth = this.getOption_('rangeSelectorFGLineWidth');
+  ctx.strokeStyle = this.getOption_('rangeSelectorForegroundStrokeColor');
+  ctx.lineWidth = this.getOption_('rangeSelectorForegroundLineWidth');
   if (!zoomHandleStatus.isZoomed) {
     ctx.beginPath();
     ctx.moveTo(margin, margin);