From: Evert Timberg Date: Sun, 24 May 2015 01:44:50 +0000 (-0400) Subject: Clean up some unused config options. Renamed 'show' to 'display' for scales since... X-Git-Tag: v2.0-alpha~8^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4e7765a50ce96ca2dd58ad3657ed310aac9d032;p=thirdparty%2FChart.js.git Clean up some unused config options. Renamed 'show' to 'display' for scales since that was clearer and maintains backwards compatibility. --- diff --git a/samples/bar-multi-axis.html b/samples/bar-multi-axis.html index 4a7ccb848..7a54ae0d7 100644 --- a/samples/bar-multi-axis.html +++ b/samples/bar-multi-axis.html @@ -54,7 +54,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "left", - horizontal: false, id: "y-axis-1", // grid line settings @@ -86,7 +85,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "right", - horizontal: false, id: "y-axis-2", // grid line settings diff --git a/samples/line-multi-axis.html b/samples/line-multi-axis.html index d1f9e6195..143bc9abc 100644 --- a/samples/line-multi-axis.html +++ b/samples/line-multi-axis.html @@ -63,7 +63,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "left", - horizontal: false, id: "y-axis-1", // grid line settings @@ -95,7 +94,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "right", - horizontal: false, id: "y-axis-2", // grid line settings diff --git a/samples/scatter-multi-axis.html b/samples/scatter-multi-axis.html index a7ca3f96e..33f005125 100644 --- a/samples/scatter-multi-axis.html +++ b/samples/scatter-multi-axis.html @@ -106,7 +106,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "left", - horizontal: false, id: "y-axis-1", // grid line settings @@ -138,7 +137,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "right", - horizontal: false, id: "y-axis-2", // grid line settings diff --git a/src/Chart.Bar.js b/src/Chart.Bar.js index a7d3f0e98..4d737ddb4 100644 --- a/src/Chart.Bar.js +++ b/src/Chart.Bar.js @@ -10,9 +10,8 @@ scales: { xAxes: [{ scaleType: "dataset", // scatter should not use a dataset axis - show: true, + display: true, position: "bottom", - horizontal: true, id: "x-axis-1", // need an ID so datasets can reference the scale // grid line settings @@ -46,7 +45,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "left", - horizontal: false, id: "y-axis-1", // grid line settings diff --git a/src/Chart.Line.js b/src/Chart.Line.js index ed3eae225..366384367 100644 --- a/src/Chart.Line.js +++ b/src/Chart.Line.js @@ -10,9 +10,8 @@ scales: { xAxes: [{ scaleType: "dataset", // scatter should not use a dataset axis - show: true, + display: true, position: "bottom", - horizontal: true, id: "x-axis-1", // need an ID so datasets can reference the scale // grid line settings @@ -46,7 +45,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "left", - horizontal: false, id: "y-axis-1", // grid line settings diff --git a/src/Chart.Scale.js b/src/Chart.Scale.js index 280928770..7d6436c75 100644 --- a/src/Chart.Scale.js +++ b/src/Chart.Scale.js @@ -460,7 +460,7 @@ // Actualy draw the scale on the canvas // @param {rectangle} chartArea : the area of the chart to draw full grid lines on draw: function(chartArea) { - if (this.options.show) { + if (this.options.display) { var setContextLineSettings; var hasZero; @@ -646,7 +646,7 @@ this.labelRotation = 0; - if (this.options.show) { + if (this.options.display) { var originalLabelWidth = helpers.longestText(this.ctx, labelFont, this.labels); var cosRotation; var sinRotation; @@ -726,7 +726,7 @@ // Actualy draw the scale on the canvas // @param {rectangle} chartArea : the area of the chart to draw full grid lines on draw: function(chartArea) { - if (this.options.show) { + if (this.options.display) { var setContextLineSettings; diff --git a/src/Chart.Scatter.js b/src/Chart.Scatter.js index 127b4294e..0211c74fc 100644 --- a/src/Chart.Scatter.js +++ b/src/Chart.Scatter.js @@ -10,9 +10,8 @@ scales: { xAxes: [{ scaleType: "linear", // scatter should not use a dataset axis - show: true, + display: true, position: "bottom", - horizontal: true, id: "x-axis-1", // need an ID so datasets can reference the scale // grid line settings @@ -45,7 +44,6 @@ scaleType: "linear", // only linear but allow scale type registration. This allows extensions to exist solely for log scale for instance show: true, position: "left", - horizontal: false, id: "y-axis-1", // grid line settings