]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Move scale defining options up from `ticks` (#6738)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Fri, 15 Nov 2019 17:11:13 +0000 (19:11 +0200)
committerEvert Timberg <evert.timberg+github@gmail.com>
Fri, 15 Nov 2019 17:11:13 +0000 (12:11 -0500)
* Move scale defining options up from `ticks`
* Include `ticks.reverse` in v3-migration

138 files changed:
docs/README.md
docs/axes/README.md
docs/axes/cartesian/category.md
docs/axes/cartesian/linear.md
docs/axes/radial/linear.md
docs/charts/bar.md
docs/charts/mixed.md
docs/charts/radar.md
docs/getting-started/usage.md
docs/getting-started/v3-migration.md
samples/charts/line/interpolation-modes.html
samples/charts/radar.html
samples/scales/gridlines-display.html
samples/scales/gridlines-style.html
samples/scales/linear/min-max-suggested.html
samples/scales/linear/min-max.html
samples/scales/linear/step-size.html
samples/scales/non-numeric-y.html
src/controllers/controller.polarArea.js
src/core/core.controller.js
src/core/core.datasetController.js
src/core/core.scale.js
src/plugins/plugin.filler.js
src/scales/scale.linear.js
src/scales/scale.linearbase.js
src/scales/scale.logarithmic.js
src/scales/scale.radialLinear.js
src/scales/scale.time.js
test/fixtures/controller.bar/backgroundColor/scriptable.js
test/fixtures/controller.bar/bar-thickness-absolute.json
test/fixtures/controller.bar/bar-thickness-flex-offset.json
test/fixtures/controller.bar/bar-thickness-flex-single-reverse.json
test/fixtures/controller.bar/bar-thickness-flex-single.json
test/fixtures/controller.bar/bar-thickness-flex.json
test/fixtures/controller.bar/bar-thickness-max.json
test/fixtures/controller.bar/bar-thickness-min-interval.json
test/fixtures/controller.bar/bar-thickness-multiple.json
test/fixtures/controller.bar/bar-thickness-no-overlap.json
test/fixtures/controller.bar/bar-thickness-offset.json
test/fixtures/controller.bar/bar-thickness-per-dataset-stacked.json
test/fixtures/controller.bar/bar-thickness-per-dataset.json
test/fixtures/controller.bar/bar-thickness-reverse.json
test/fixtures/controller.bar/bar-thickness-single-xy.json
test/fixtures/controller.bar/bar-thickness-single.json
test/fixtures/controller.bar/bar-thickness-stacked.json
test/fixtures/controller.bar/borderColor/scriptable.js
test/fixtures/controller.bar/borderSkipped/scriptable.js
test/fixtures/controller.bar/borderWidth/scriptable-object.js
test/fixtures/controller.bar/borderWidth/scriptable.js
test/fixtures/controller.bar/chart-area-clip.js
test/fixtures/controller.bar/floatBar/float-bar-horizontal.json
test/fixtures/controller.bar/floatBar/float-bar-stacked-horizontal.json
test/fixtures/controller.bar/floatBar/float-bar-stacked.json
test/fixtures/controller.bar/floatBar/float-bar.json
test/fixtures/controller.bar/stacking/order-default.json
test/fixtures/controller.bar/stacking/order-specified.json
test/fixtures/controller.bubble/clip.js
test/fixtures/controller.bubble/point-style.json
test/fixtures/controller.line/backgroundColor/scriptable.js
test/fixtures/controller.line/borderCapStyle/scriptable.js
test/fixtures/controller.line/borderColor/scriptable.js
test/fixtures/controller.line/borderDash/scriptable.js
test/fixtures/controller.line/borderWidth/scriptable.js
test/fixtures/controller.line/clip/default-x-max.json
test/fixtures/controller.line/clip/default-x-min.json
test/fixtures/controller.line/clip/default-x.json
test/fixtures/controller.line/clip/default-y-max.json
test/fixtures/controller.line/clip/default-y-min.json
test/fixtures/controller.line/clip/default-y.json
test/fixtures/controller.line/clip/specified.json
test/fixtures/controller.line/point-style.json
test/fixtures/controller.line/pointBackgroundColor/scriptable.js
test/fixtures/controller.line/pointBorderColor/scriptable.js
test/fixtures/controller.line/pointBorderWidth/scriptable.js
test/fixtures/controller.line/pointStyle/scriptable.js
test/fixtures/controller.line/radius/scriptable.js
test/fixtures/controller.line/rotation/scriptable.js
test/fixtures/controller.radar/backgroundColor/scriptable.js
test/fixtures/controller.radar/backgroundColor/value.js
test/fixtures/controller.radar/borderCapStyle/scriptable.js
test/fixtures/controller.radar/borderCapStyle/value.js
test/fixtures/controller.radar/borderColor/scriptable.js
test/fixtures/controller.radar/borderColor/value.js
test/fixtures/controller.radar/borderDash/scriptable.js
test/fixtures/controller.radar/borderDash/value.js
test/fixtures/controller.radar/borderDashOffset/scriptable.js
test/fixtures/controller.radar/borderDashOffset/value.js
test/fixtures/controller.radar/borderJoinStyle/scriptable.js
test/fixtures/controller.radar/borderJoinStyle/value.js
test/fixtures/controller.radar/borderWidth/scriptable.js
test/fixtures/controller.radar/borderWidth/value.js
test/fixtures/controller.radar/fill/scriptable.js
test/fixtures/controller.radar/fill/value.js
test/fixtures/controller.radar/point-style.json
test/fixtures/controller.radar/pointBackgroundColor/indexable.js
test/fixtures/controller.radar/pointBackgroundColor/scriptable.js
test/fixtures/controller.radar/pointBackgroundColor/value.js
test/fixtures/controller.radar/pointBorderColor/indexable.js
test/fixtures/controller.radar/pointBorderColor/scriptable.js
test/fixtures/controller.radar/pointBorderColor/value.js
test/fixtures/controller.radar/pointBorderWidth/indexable.js
test/fixtures/controller.radar/pointBorderWidth/scriptable.js
test/fixtures/controller.radar/pointBorderWidth/value.js
test/fixtures/controller.radar/pointStyle/indexable.js
test/fixtures/controller.radar/pointStyle/scriptable.js
test/fixtures/controller.radar/pointStyle/value.js
test/fixtures/controller.radar/radius/indexable.js
test/fixtures/controller.radar/radius/scriptable.js
test/fixtures/controller.radar/radius/value.js
test/fixtures/controller.radar/rotation/indexable.js
test/fixtures/controller.radar/rotation/scriptable.js
test/fixtures/controller.radar/rotation/value.js
test/fixtures/core.scale/tick-drawing.json
test/fixtures/element.line/default.js
test/fixtures/element.line/skip/all.js
test/fixtures/element.line/skip/first-span.js
test/fixtures/element.line/skip/first.js
test/fixtures/element.line/skip/last-span.js
test/fixtures/element.line/skip/last.js
test/fixtures/element.line/skip/middle-span.js
test/fixtures/element.line/skip/middle.js
test/fixtures/element.line/stepped/after.js
test/fixtures/element.line/stepped/before.js
test/fixtures/element.line/stepped/default.js
test/fixtures/element.line/stepped/middle.js
test/fixtures/element.line/tension/default.js
test/fixtures/element.line/tension/one.js
test/fixtures/element.line/tension/zero.js
test/specs/controller.bar.tests.js
test/specs/controller.line.tests.js
test/specs/core.controller.tests.js
test/specs/core.scale.tests.js
test/specs/core.ticks.tests.js
test/specs/scale.category.tests.js
test/specs/scale.linear.tests.js
test/specs/scale.logarithmic.tests.js
test/specs/scale.radialLinear.tests.js
test/specs/scale.time.tests.js

index 9592ecf2c10c7b77e76d48540c63e9641a091738..c82e938724e66ad910a44a2475c480872dbe9ac4 100644 (file)
@@ -44,9 +44,7 @@ var myChart = new Chart(ctx, {
     options: {
         scales: {
             yAxes: [{
-                ticks: {
-                    beginAtZero: true
-                }
+                beginAtZero: true
             }]
         }
     }
index e400f2a7681ba52a7e1d81b6708189f620d26175..c91b9d220f74c3134a65da72bdbf25036bcfcdc1 100644 (file)
@@ -5,6 +5,7 @@ Axes are an integral part of a chart. They are used to determine how data maps t
 In a radial chart, such as a radar chart or a polar area chart, there is a single axis that maps points in the angular and radial directions. These are known as ['radial axes'](./radial/README.md#radial-axes).
 
 Scales in Chart.js >v2.0 are significantly more powerful, but also different than those of v1.0.
+
 * Multiple X & Y axes are supported.
 * A built-in label auto-skip feature detects would-be overlapping ticks and labels and removes every nth label to keep things displaying normally.
 * Scale titles are supported.
@@ -21,6 +22,7 @@ The following properties are common to all axes provided by Chart.js.
 | `weight` | `number` | `0` | The weight used to sort the axis. Higher weights are further away from the chart area.
 
 ### Callbacks
+
 There are a number of config callbacks that can be used to change parameters in the scale at different points in the update process.
 
 | Name | Arguments | Description
@@ -48,11 +50,10 @@ For example, to set the minimum value of 0 for all linear scales, you would do t
 
 ```javascript
 Chart.scaleService.updateScaleDefaults('linear', {
-    ticks: {
-        min: 0
-    }
+    min: 0
 });
 ```
 
 ## Creating New Axes
+
 To create a new axis, see the [developer docs](../developers/axes.md).
index 690b712f5c3a5ae045b05da6500c18f10418eb20..acb140cbedbb012bb835530a982ae54f3e70db98 100644 (file)
@@ -59,9 +59,7 @@ let chart = new Chart(ctx, {
     options: {
         scales: {
             xAxes: [{
-                ticks: {
-                    min: 'March'
-                }
+                min: 'March'
             }]
         }
     }
index ef4833b56e0224a0ec84af20f12db0ee5e447e5a..52b287dfe167a66e269b6841db4df0d3ecd9f8d1 100644 (file)
@@ -2,18 +2,23 @@
 
 The linear scale is use to chart numerical data. It can be placed on either the x or y axis. The scatter chart type automatically configures a line chart to use one of these scales for the x axis. As the name suggests, linear interpolation is used to determine where a value lies on the axis.
 
+## Configuration Options
+
+| Name | Type | Description
+| ---- | ---- | -----------
+| `beginAtZero` | `boolean` | if true, scale will include 0 if it is not already included.
+| `suggestedMax` | `number` | Adjustment used when calculating the maximum data value. [more...](#axis-range-settings)
+| `suggestedMin` | `number` | Adjustment used when calculating the minimum data value. [more...](#axis-range-settings)
+
 ## Tick Configuration Options
 
 The following options are provided by the linear scale. They are all located in the `ticks` sub options. These options extend the [common tick configuration](README.md#tick-configuration).
 
 | Name | Type | Default | Description
 | ---- | ---- | ------- | -----------
-| `beginAtZero` | `boolean` | | if true, scale will include 0 if it is not already included.
 | `maxTicksLimit` | `number` | `11` | Maximum number of ticks and gridlines to show.
 | `precision` | `number` | | if defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
 | `stepSize` | `number` | | User defined fixed step size for the scale. [more...](#step-size)
-| `suggestedMax` | `number` | | Adjustment used when calculating the maximum data value. [more...](#axis-range-settings)
-| `suggestedMin` | `number` | | Adjustment used when calculating the minimum data value. [more...](#axis-range-settings)
 
 ## Axis Range Settings
 
@@ -22,8 +27,8 @@ Given the number of axis range settings, it is important to understand how they
 The `suggestedMax` and `suggestedMin` settings only change the data values that are used to scale the axis. These are useful for extending the range of the axis while maintaining the auto fit behaviour.
 
 ```javascript
-let minDataValue = Math.min(mostNegativeValue, options.ticks.suggestedMin);
-let maxDataValue = Math.max(mostPositiveValue, options.ticks.suggestedMax);
+let minDataValue = Math.min(mostNegativeValue, options.suggestedMin);
+let maxDataValue = Math.max(mostPositiveValue, options.suggestedMax);
 ```
 
 In this example, the largest positive value is 50, but the data maximum is expanded out to 100. However, because the lowest data value is below the `suggestedMin` setting, it is ignored.
@@ -41,10 +46,8 @@ let chart = new Chart(ctx, {
     options: {
         scales: {
             yAxes: [{
-                ticks: {
-                    suggestedMin: 50,
-                    suggestedMax: 100
-                }
+                suggestedMin: 50,
+                suggestedMax: 100
             }]
         }
     }
@@ -54,6 +57,7 @@ let chart = new Chart(ctx, {
 In contrast to the `suggested*` settings, the `min` and `max` settings set explicit ends to the axes. When these are set, some data points may not be visible.
 
 ## Step Size
+
 If set, the scale ticks will be enumerated by multiple of `stepSize`, having one tick per increment. If not set, the ticks are labeled automatically using the nice numbers algorithm.
 
 This example sets up a chart with a y axis that creates ticks at `0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5`.
@@ -62,9 +66,9 @@ This example sets up a chart with a y axis that creates ticks at `0, 0.5, 1, 1.5
 let options = {
     scales: {
         yAxes: [{
+            max: 5,
+            min: 0,
             ticks: {
-                max: 5,
-                min: 0,
                 stepSize: 0.5
             }
         }]
index 72e0edd0645eae3cf47d32526b1b0f7890329a17..ca89aa3243d51bfb7a1606368bf1e81940031aef 100644 (file)
@@ -8,14 +8,20 @@ The following additional configuration options are provided by the radial linear
 
 The axis has configuration properties for ticks, angle lines (line that appear in a radar chart outward from the center), pointLabels (labels around the edge in a radar chart). The following sections define each of the properties in those sections.
 
-| Name | Type | Description
-| ---- | ---- | -----------
-| `angleLines` | `object` | Angle line configuration. [more...](#angle-line-options)
-| `gridLines` | `object` | Grid line configuration. [more...](../styling.md#grid-line-configuration)
-| `pointLabels` | `object` | Point label configuration. [more...](#point-label-options)
-| `ticks` | `object` | Tick configuration. [more...](#tick-options)
+| Name | Type | Default | Description
+| ---- | ---- | ------- | -----------
+| `angleLines` | `object` | | Angle line configuration. [more...](#angle-line-options)
+| `beginAtZero` | `boolean` | `false` | if true, scale will include 0 if it is not already included.
+| `gridLines` | `object` | | Grid line configuration. [more...](../styling.md#grid-line-configuration)
+| `min` | `number` | | User defined minimum number for the scale, overrides minimum value from data. [more...](#axis-range-settings)
+| `max` | `number` | | User defined maximum number for the scale, overrides maximum value from data. [more...](#axis-range-settings)
+| `pointLabels` | `object` | | Point label configuration. [more...](#point-label-options)
+| `suggestedMax` | `number` | | Adjustment used when calculating the maximum data value. [more...](#axis-range-settings)
+| `suggestedMin` | `number` | | Adjustment used when calculating the minimum data value. [more...](#axis-range-settings)
+| `ticks` | `object` | | Tick configuration. [more...](#tick-options)
 
 ## Tick Options
+
 The following options are provided by the linear scale. They are all located in the `ticks` sub options. The [common tick configuration](../styling.md#tick-configuration) options are supported by this axis.
 
 | Name | Type | Default | Description
@@ -23,14 +29,9 @@ The following options are provided by the linear scale. They are all located in
 | `backdropColor` | `Color` | `'rgba(255, 255, 255, 0.75)'` | Color of label backdrops.
 | `backdropPaddingX` | `number` | `2` | Horizontal padding of label backdrop.
 | `backdropPaddingY` | `number` | `2` | Vertical padding of label backdrop.
-| `beginAtZero` | `boolean` | `false` | if true, scale will include 0 if it is not already included.
-| `min` | `number` | | User defined minimum number for the scale, overrides minimum value from data. [more...](#axis-range-settings)
-| `max` | `number` | | User defined maximum number for the scale, overrides maximum value from data. [more...](#axis-range-settings)
 | `maxTicksLimit` | `number` | `11` | Maximum number of ticks and gridlines to show.
 | `precision` | `number` | | if defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
 | `stepSize` | `number` | | User defined fixed step size for the scale. [more...](#step-size)
-| `suggestedMax` | `number` | | Adjustment used when calculating the maximum data value. [more...](#axis-range-settings)
-| `suggestedMin` | `number` | | Adjustment used when calculating the minimum data value. [more...](#axis-range-settings)
 | `showLabelBackdrop` | `boolean` | `true` | If true, draw a background behind the tick labels.
 
 ## Axis Range Settings
@@ -58,10 +59,8 @@ let chart = new Chart(ctx, {
     },
     options: {
         scale: {
-            ticks: {
-                suggestedMin: 50,
-                suggestedMax: 100
-            }
+            suggestedMin: 50,
+            suggestedMax: 100
         }
     }
 });
@@ -77,9 +76,9 @@ This example sets up a chart with a y axis that creates ticks at `0, 0.5, 1, 1.5
 ```javascript
 let options = {
     scale: {
+        max: 5,
+        min: 0,
         ticks: {
-            max: 5,
-            min: 0,
             stepSize: 0.5
         }
     }
index f2b0193bd2aaef578e4e17e902097ed5f9082c0d..8cf78f9950288263fad73c96964d6650ed6440d6 100644 (file)
@@ -42,9 +42,7 @@ A bar chart provides a way of showing data values represented as vertical bars.
     "options": {
         "scales": {
             "yAxes": [{
-                "ticks": {
-                    "beginAtZero": true
-                }
+                "beginAtZero": true
             }]
         }
     }
@@ -52,6 +50,7 @@ A bar chart provides a way of showing data values represented as vertical bars.
 {% endchartjs %}
 
 ## Example Usage
+
 ```javascript
 var myBarChart = new Chart(ctx, {
     type: 'bar',
@@ -302,9 +301,7 @@ A horizontal bar chart is a variation on a vertical bar chart. It is sometimes u
     "options": {
         "scales": {
             "xAxes": [{
-                "ticks": {
-                    "beginAtZero": true
-                }
+                "beginAtZero": true
             }]
         }
     }
@@ -312,6 +309,7 @@ A horizontal bar chart is a variation on a vertical bar chart. It is sometimes u
 {% endchartjs %}
 
 ## Example
+
 ```javascript
 var myBarChart = new Chart(ctx, {
     type: 'horizontalBar',
@@ -321,6 +319,7 @@ var myBarChart = new Chart(ctx, {
 ```
 
 ### Config Options
+
 The configuration options for the horizontal bar chart are the same as for the [bar chart](#scale-configuration). However, any options specified on the x axis in a bar chart, are applied to the y axis in a horizontal bar chart.
 
 The default horizontal bar configuration is specified in `Chart.defaults.horizontalBar`.
index 5ead1fb343a7c904c56a62cd59042bb5b8177921..96f541672ae2990f18705b8343ef1a49b9501803 100644 (file)
@@ -62,9 +62,7 @@ At this point we have a chart rendering how we'd like. It's important to note th
     "options": {
         "scales": {
             "yAxes": [{
-                "ticks": {
-                    "beginAtZero": true
-                }
+                "beginAtZero": true
             }]
         }
     }
index 0e993f597bf5fa00db24f64c5cfeacff0f2c8618..f11eb3888d4c466d6fb6f77aa736d7242c4f7485 100644 (file)
@@ -172,10 +172,8 @@ options = {
         angleLines: {
             display: false
         },
-        ticks: {
-            suggestedMin: 50,
-            suggestedMax: 100
-        }
+        suggestedMin: 50,
+        suggestedMax: 100
     }
 };
 ```
index 0a0d48b99628627184c852aee1d306dfad5c69a2..5b6311d91d601b6f739611326eba3ce4a0da8307 100644 (file)
@@ -54,9 +54,7 @@ var myChart = new Chart(ctx, {
     options: {
         scales: {
             yAxes: [{
-                ticks: {
-                    beginAtZero: true
-                }
+                beginAtZero: true
             }]
         }
     }
index a797db8e2fcec17b50c2205edfc92e8a8d16fed5..b16a3066b3d187dcf622aa1c98f6edbfb6068d37 100644 (file)
@@ -37,9 +37,15 @@ Chart.js is no longer providing the `Chart.bundle.js` and `Chart.bundle.min.js`.
 * `scales.[x/y]Axes.categoryPercentage` was moved to dataset option `categoryPercentage`
 * `scales.[x/y]Axes.minBarLength` was moved to dataset option `minBarLength`
 * `scales.[x/y]Axes.maxBarThickness` was moved to dataset option `maxBarThickness`
+* `scales.[x/y]Axes.ticks.beginAtZero` was renamed to `scales.[x/y]Axes.beginAtZero`
+* `scales.[x/y]Axes.ticks.max` was renamed to `scales.[x/y]Axes.max`
+* `scales.[x/y]Axes.ticks.min` was renamed to `scales.[x/y]Axes.min`
+* `scales.[x/y]Axes.ticks.reverse` was renamed to `scales.[x/y]Axes.reverse`
+* `scales.[x/y]Axes.ticks.suggestedMax` was renamed to `scales.[x/y]Axes.suggestedMax`
+* `scales.[x/y]Axes.ticks.suggestedMin` was renamed to `scales.[x/y]Axes.suggestedMin`
 * `scales.[x/y]Axes.time.format` was renamed to `scales.[x/y]Axes.time.parser`
-* `scales.[x/y]Axes.time.min` was renamed to `scales.[x/y]Axes.ticks.min`
-* `scales.[x/y]Axes.time.max` was renamed to `scales.[x/y]Axes.ticks.max`
+* `scales.[x/y]Axes.time.max` was renamed to `scales.[x/y]Axes.max`
+* `scales.[x/y]Axes.time.min` was renamed to `scales.[x/y]Axes.min`
 
 ## Developer migration
 
index 037b07d2ae61481ba5181a178a55b4d04e5fce06..fa5717dbf64c26574ad096eddf9a0b95e0fd1f4e 100644 (file)
                                                        display: true,
                                                        labelString: 'Value'
                                                },
-                                               ticks: {
-                                                       suggestedMin: -10,
-                                                       suggestedMax: 200,
-                                               }
+                                               suggestedMin: -10,
+                                               suggestedMax: 200,
                                        }]
                                }
                        }
index 3f75863d1027e340b39155e787b70d6bbf1a4016..1b2f4095c2a621dcd383c9b6f4a9e94b7b8efcde 100644 (file)
@@ -72,9 +72,7 @@
                                        text: 'Chart.js Radar Chart'
                                },
                                scale: {
-                                       ticks: {
-                                               beginAtZero: true
-                                       }
+                                       beginAtZero: true
                                }
                        }
                };
index 407dbe6ee57ae658a839d6a8616fa7416d8d8cf7..2569a1e795e229555def7d2099513a5307e418da 100644 (file)
@@ -60,9 +60,9 @@
                                                }],
                                                yAxes: [{
                                                        gridLines: gridlines,
+                                                       min: 0,
+                                                       max: 100,
                                                        ticks: {
-                                                               min: 0,
-                                                               max: 100,
                                                                stepSize: 10
                                                        }
                                                }]
index ed5ea5d68202129f5b1cf77ee9b94e1e8cb95609..9dabae29322f974a5f8e741982548ab49b34c66e 100644 (file)
@@ -49,9 +49,9 @@
                                                        drawBorder: false,
                                                        color: ['pink', 'red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'purple']
                                                },
+                                               min: 0,
+                                               max: 100,
                                                ticks: {
-                                                       min: 0,
-                                                       max: 100,
                                                        stepSize: 10
                                                }
                                        }]
index 83ce7bc07962bcf1308ca42b5156a600eb566216..81512ca926dbe0823e729beeda0b63d561389f46 100644 (file)
                                },
                                scales: {
                                        yAxes: [{
-                                               ticks: {
-                                                       // the data minimum used for determining the ticks is Math.min(dataMin, suggestedMin)
-                                                       suggestedMin: 10,
+                                               // the data minimum used for determining the ticks is Math.min(dataMin, suggestedMin)
+                                               suggestedMin: 10,
 
-                                                       // the data maximum used for determining the ticks is Math.max(dataMax, suggestedMax)
-                                                       suggestedMax: 50
-                                               }
+                                               // the data maximum used for determining the ticks is Math.max(dataMax, suggestedMax)
+                                               suggestedMax: 50
                                        }]
                                }
                        }
index f0c87be85602bcb6fc22522f8692405f4baa456e..5a8981017a422a4136303eed695cbc7e133aad60 100644 (file)
                                },
                                scales: {
                                        yAxes: [{
-                                               ticks: {
-                                                       min: 10,
-                                                       max: 50
-                                               }
+                                               min: 10,
+                                               max: 50
                                        }]
                                }
                        }
index 2ee0c57569840f73f6d148730df8792af4bd5103..ac667cc0486ee03d46eb69eb7ec013f657e6822a 100644 (file)
                                                        display: true,
                                                        labelString: 'Value'
                                                },
+                                               min: 0,
+                                               max: 100,
                                                ticks: {
-                                                       min: 0,
-                                                       max: 100,
-
                                                        // forces step size to be 5 units
                                                        stepSize: 5
                                                }
index e7eb2776a1d978f72c9aa111fcb7d3a41f244cf4..09c9a61ca2128e11dade3fc90e5b6edfdfa26540 100644 (file)
@@ -54,9 +54,7 @@
                                                        display: true,
                                                        labelString: 'Request State'
                                                },
-                                               ticks: {
-                                                       reverse: true
-                                               }
+                                               reverse: true
                                        }]
                                }
                        }
index 0272d6e464a563a9cbf0ea4e06e4fb6d9077e5d8..4bd83c9d97ae6d7c512c308ceb16f4dbe5b70099 100644 (file)
@@ -13,14 +13,12 @@ defaults._set('polarArea', {
                angleLines: {
                        display: false
                },
+               beginAtZero: true,
                gridLines: {
                        circular: true
                },
                pointLabels: {
                        display: false
-               },
-               ticks: {
-                       beginAtZero: true
                }
        },
 
index c1ca43a3d616930d00a353848cb12e1098a71333..a1325394a51f107e42aba17b3d1adca86bd0081c 100644 (file)
@@ -392,8 +392,8 @@ helpers.extend(Chart.prototype, /** @lends Chart */ {
                        }
 
                        // parse min/max value, so we can properly determine min/max for other scales
-                       scale._userMin = scale._parse(scale.options.ticks.min);
-                       scale._userMax = scale._parse(scale.options.ticks.max);
+                       scale._userMin = scale._parse(scale.options.min);
+                       scale._userMax = scale._parse(scale.options.max);
 
                        // TODO(SB): I think we should be able to remove this custom case (options.scale)
                        // and consider it as a regular scale part of the "scales"" map only! This would
index d9adc2ef9afc44b8303e0c055d2cf94abbfe3802..541da77752380d279338070398508c46ce38ab0a 100644 (file)
@@ -50,10 +50,10 @@ function listenArrayEvents(array, listener) {
 
 
 function scaleClip(scale, allowedOverflow) {
-       var tickOpts = scale && scale.options.ticks || {};
-       var reverse = tickOpts.reverse;
-       var min = tickOpts.min === undefined ? allowedOverflow : 0;
-       var max = tickOpts.max === undefined ? allowedOverflow : 0;
+       var opts = scale && scale.options || {};
+       var reverse = opts.reverse;
+       var min = opts.min === undefined ? allowedOverflow : 0;
+       var max = opts.max === undefined ? allowedOverflow : 0;
        return {
                start: reverse ? max : min,
                end: reverse ? min : max
index a06438ebaae2a86eafe0308faf2562532244cb5f..5b59f348d2bf863a1ecc60ba6d2b994bf81d83f0 100644 (file)
@@ -16,6 +16,8 @@ defaults._set('scale', {
        display: true,
        position: 'left',
        offset: false,
+       reverse: false,
+       beginAtZero: false,
 
        // grid line settings
        gridLines: {
@@ -48,12 +50,10 @@ defaults._set('scale', {
 
        // label settings
        ticks: {
-               beginAtZero: false,
                minRotation: 0,
                maxRotation: 50,
                mirror: false,
                padding: 0,
-               reverse: false,
                display: true,
                autoSkip: true,
                autoSkipPadding: 0,
@@ -530,7 +530,7 @@ class Scale extends Element {
         */
        _configure() {
                var me = this;
-               var reversePixels = me.options.ticks.reverse;
+               var reversePixels = me.options.reverse;
                var startPixel, endPixel;
 
                if (me.isHorizontal()) {
@@ -1291,7 +1291,7 @@ class Scale extends Element {
                var scaleLabelAlign = scaleLabel.align;
                var position = options.position;
                var rotation = 0;
-               var isReverse = me.options.ticks.reverse;
+               var isReverse = me.options.reverse;
                var scaleLabelX, scaleLabelY, textAlign;
 
                if (me.isHorizontal()) {
index 00000e4fd6b77b32b595d191872c58c677704634..fd69b8ff420140713054fe6ead44a37681e49ed0 100644 (file)
@@ -156,8 +156,8 @@ function computeCircularBoundary(source) {
                return null;
        }
 
-       start = options.ticks.reverse ? scale.max : scale.min;
-       end = options.ticks.reverse ? scale.min : scale.max;
+       start = options.reverse ? scale.max : scale.min;
+       end = options.reverse ? scale.min : scale.max;
        center = scale.getPointPositionForValue(0, start);
        for (i = 0; i < length; ++i) {
                point = fill === 'start' || fill === 'end'
index 84c3b19c5ea8023afb4fa06d6f0bc720509f8a10..36a0fa62ce2adb481b5b1f088dc2f3be1a3e3196 100644 (file)
@@ -28,7 +28,7 @@ module.exports = LinearScaleBase.extend({
                        me.min = 0;
                }
 
-               // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero
+               // Common base implementation to handle min, max, beginAtZero
                me.handleTickRangeOptions();
        },
 
index cff6830ea153928869b34d6eeb3356ff71a72682..a41e8c5843f535f9b16302e0958ef5f998f28aec 100644 (file)
@@ -98,12 +98,11 @@ module.exports = Scale.extend({
        handleTickRangeOptions: function() {
                var me = this;
                var opts = me.options;
-               var tickOpts = opts.ticks;
 
                // If we are forcing it to begin at 0, but 0 will already be rendered on the chart,
                // do nothing since that would make the chart weird. If the user really wants a weird chart
                // axis, they can manually override it
-               if (tickOpts.beginAtZero) {
+               if (opts.beginAtZero) {
                        var minSign = helpers.sign(me.min);
                        var maxSign = helpers.sign(me.max);
 
@@ -116,26 +115,26 @@ module.exports = Scale.extend({
                        }
                }
 
-               var setMin = tickOpts.min !== undefined || tickOpts.suggestedMin !== undefined;
-               var setMax = tickOpts.max !== undefined || tickOpts.suggestedMax !== undefined;
+               var setMin = opts.min !== undefined || opts.suggestedMin !== undefined;
+               var setMax = opts.max !== undefined || opts.suggestedMax !== undefined;
 
-               if (tickOpts.min !== undefined) {
-                       me.min = tickOpts.min;
-               } else if (tickOpts.suggestedMin !== undefined) {
+               if (opts.min !== undefined) {
+                       me.min = opts.min;
+               } else if (opts.suggestedMin !== undefined) {
                        if (me.min === null) {
-                               me.min = tickOpts.suggestedMin;
+                               me.min = opts.suggestedMin;
                        } else {
-                               me.min = Math.min(me.min, tickOpts.suggestedMin);
+                               me.min = Math.min(me.min, opts.suggestedMin);
                        }
                }
 
-               if (tickOpts.max !== undefined) {
-                       me.max = tickOpts.max;
-               } else if (tickOpts.suggestedMax !== undefined) {
+               if (opts.max !== undefined) {
+                       me.max = opts.max;
+               } else if (opts.suggestedMax !== undefined) {
                        if (me.max === null) {
-                               me.max = tickOpts.suggestedMax;
+                               me.max = opts.suggestedMax;
                        } else {
-                               me.max = Math.max(me.max, tickOpts.suggestedMax);
+                               me.max = Math.max(me.max, opts.suggestedMax);
                        }
                }
 
@@ -143,7 +142,7 @@ module.exports = Scale.extend({
                        // We set the min or the max but not both.
                        // So ensure that our range is good
                        // Inverted or 0 length range can happen when
-                       // ticks.min is set, and no datasets are visible
+                       // min is set, and no datasets are visible
                        if (me.min >= me.max) {
                                if (setMin) {
                                        me.max = me.min + 1;
@@ -156,7 +155,7 @@ module.exports = Scale.extend({
                if (me.min === me.max) {
                        me.max++;
 
-                       if (!tickOpts.beginAtZero) {
+                       if (!opts.beginAtZero) {
                                me.min--;
                        }
                }
@@ -205,8 +204,8 @@ module.exports = Scale.extend({
 
                var numericGeneratorOptions = {
                        maxTicks: maxTicks,
-                       min: tickOpts.min,
-                       max: tickOpts.max,
+                       min: opts.min,
+                       max: opts.max,
                        precision: tickOpts.precision,
                        stepSize: helpers.valueOrDefault(tickOpts.fixedStepSize, tickOpts.stepSize)
                };
@@ -218,7 +217,7 @@ module.exports = Scale.extend({
                // range of the scale
                helpers._setMinAndMaxByKey(ticks, me, 'value');
 
-               if (tickOpts.reverse) {
+               if (opts.reverse) {
                        ticks.reverse();
 
                        me.start = me.max;
index ae5e65824f450908e81b7d0bdd23193daf7881a5..561af5449d52d0e5edbaf993cddf8ba7fb0410b8 100644 (file)
@@ -123,7 +123,7 @@ module.exports = Scale.extend({
 
        buildTicks: function() {
                var me = this;
-               var tickOpts = me.options.ticks;
+               var opts = me.options;
                var reverse = !me.isHorizontal();
 
                var generationOptions = {
@@ -136,7 +136,7 @@ module.exports = Scale.extend({
                // range of the scale
                helpers._setMinAndMaxByKey(ticks, me, 'value');
 
-               if (tickOpts.reverse) {
+               if (opts.reverse) {
                        reverse = !reverse;
                        me.start = me.max;
                        me.end = me.min;
index 5ccf9a20d0055a4b2dbd309247cdaa0b5c299fba..50d95ff812955464bfc8fd1d67f23f60d109aaa7 100644 (file)
@@ -312,7 +312,7 @@ module.exports = LinearScaleBase.extend({
                me.min = helpers.isFinite(min) && !isNaN(min) ? min : 0;
                me.max = helpers.isFinite(max) && !isNaN(max) ? max : 0;
 
-               // Common base implementation to handle ticks.min, ticks.max, ticks.beginAtZero
+               // Common base implementation to handle min, max, beginAtZero
                me.handleTickRangeOptions();
        },
 
@@ -398,7 +398,7 @@ module.exports = LinearScaleBase.extend({
 
                // Take into account half font size + the yPadding of the top value
                var scalingFactor = me.drawingArea / (me.max - me.min);
-               if (me.options.ticks.reverse) {
+               if (me.options.reverse) {
                        return (me.max - value) * scalingFactor;
                }
                return (value - me.min) * scalingFactor;
@@ -503,7 +503,7 @@ module.exports = LinearScaleBase.extend({
                ctx.textBaseline = 'middle';
 
                helpers.each(me.ticks, function(tick, index) {
-                       if (index === 0 && !tickOpts.reverse) {
+                       if (index === 0 && !opts.reverse) {
                                return;
                        }
 
index d0bf44aca349078d4c2731effc6783ab882404a4..89ad6bb54dac683d452baf778af551ec261bcd3a 100644 (file)
@@ -635,7 +635,7 @@ module.exports = Scale.extend({
                me._table = buildLookupTable(getTimestampsForTable(me), min, max, distribution);
                me._offsets = computeOffsets(me._table, ticks, min, max, options);
 
-               if (tickOpts.reverse) {
+               if (options.reverse) {
                        ticks.reverse();
                }
 
index b17349b1da81002d1a558488f0d28a5a562c8b7a..e7bfe20ad926ec8c4bd785958482bcddeb72f1d1 100644 (file)
@@ -40,9 +40,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 4c5ed53391d9c13d8609c47df3a93519f2f1fcd3..ea55d4fab7b777fefeddfe15a8bb9685d19856e1 100644 (file)
@@ -29,9 +29,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 6672516e472274dd0c6179322181aeb376ad8162..46265b3046745702897c141a10677f1dccd6291f 100644 (file)
@@ -29,9 +29,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index e6d1237366651d9ff51e3a505a1300e5e6dd0e09..691b33a621e7bc5af81c50ed2fc00215990d0831 100644 (file)
                     "time": {
                         "parser": "YYYY"
                     },
+                    "reverse": true,
                     "ticks": {
-                        "source": "labels",
-                        "reverse": true
+                        "source": "labels"
                     }
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index a59b2aff8022a913bba3d674c03e9dc734e25358..5f682066d64f37796fbb6c33cb585177a66977f8 100644 (file)
@@ -28,9 +28,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index b9048faed0aa05f79b2923b80d9e85d7586f8a2b..8e5eebac12b0690aabc7485ff8841046e6ade1bc 100644 (file)
@@ -28,9 +28,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 2ca185516bca350e85ccab68f936e26820e2edc8..f9d0e87a2d585d6a5f2120b27ef6d26e613bdc0e 100644 (file)
@@ -28,9 +28,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 954e15cfdf64f2b2e8375184c09a547c7882d01c..e4f9100329a8496f83956c8291afd5e9b590e4fd 100644 (file)
@@ -27,9 +27,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index f26a395fb4dca22ae47cd2991d6123b936ee0b8b..99a609892168dc321c1a9c5f4ed8e09abd2a8c47 100644 (file)
@@ -37,9 +37,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 2bfee4436c659dc07cff331139b80188c65976b6..502b02a48af41200486e79b6fe7c481e5c6d995b 100644 (file)
@@ -37,9 +37,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 8785569570b07bcbae444d0969e479ffaafe2db6..31b9304c2236aa6fffa72f3d16d0c9381bc0cde6 100644 (file)
@@ -38,9 +38,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 29210110ff2aa93770aba9aa00a6c0207b6e82bf..b23ab4936c585b7005114730b0136893552b0abb 100644 (file)
@@ -39,9 +39,7 @@
                 "yAxes": [{
                     "display": false,
                     "stacked": true,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 88f4ff1dc7dd0476144745e5c008bc3150b35bc4..6884cfa969bbe55f6e6c3b4012c46acd65961cc3 100644 (file)
@@ -32,9 +32,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 215858dd8b7ceae1a805dc811e9487842ee7e205..bcc52e9874f2d28573414024164d9abfddb13a5f 100644 (file)
                     "time": {
                         "parser": "YYYY"
                     },
+                    "reverse": true,
                     "ticks": {
-                        "source": "labels",
-                        "reverse": true
+                        "source": "labels"
                     }
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 68a99a908533b6fc58c697b8191ad71afc788497..10fdfbae7590fb2b97b8ff729039de6f28ee878f 100644 (file)
@@ -27,9 +27,7 @@
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 1b6565ed0a259e21bd7666e7f3fbd906a3e021ae..9de2600e9904273d81de1d770a1435b95b5b2b79 100644 (file)
                     "time": {
                         "parser": "YYYY"
                     },
+                    "min": "2013",
                     "ticks": {
-                        "source": "labels",
-                        "min": "2013"
+                        "source": "labels"
                     }
                 }],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 3c9f01c2867ea7e74c499683078bc20995715cbb..c3970389429c045ee70cc43b3d3ea0879cb74645 100644 (file)
@@ -39,9 +39,7 @@
                 "yAxes": [{
                     "display": false,
                     "stacked": true,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index d4fefc788f3f22a11125ec6fb6a8361ede497159..3a0646e4a72467b9eacfcef1ddb08197f4242dcb 100644 (file)
@@ -42,9 +42,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 6801d95fab8a79d5b6b8f122a25be8ecfa6bdc01..03a69142e7388d1e3f23e76d68746e514e5cc468 100644 (file)
@@ -43,9 +43,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 5bd2903efa738609d6acf36d2b6c513bc3df4790..66caf5c2d89160ea313e57aa65981f880b41720b 100644 (file)
@@ -37,9 +37,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 40128657749590afaee4607a6eb848a36b48b200..198e92b4c97caad8aff12f3e92e25076ec5a39fc 100644 (file)
@@ -35,9 +35,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 2d552dcd4dea561e23b1773c4cf6345d4a99c5e4..6985abacd5b44b8c49fd3466805d3ca2b9d0e658 100644 (file)
@@ -29,7 +29,7 @@ module.exports = {
                        },
                        scales: {
                                xAxes: [{display: false}],
-                               yAxes: [{display: false, ticks: {min: -10, max: 10}}]
+                               yAxes: [{display: false, min: -10, max: 10}]
                        }
                }
        },
index c54dea9ce96d891260976c1731417bffa88560f5..0a5986abbee6b4e90568b781cca1bff7802c7a95 100644 (file)
             "scales": {
                 "xAxes": [{
                     "display": false,
-                    "ticks": {
-                        "min": -8,
-                        "max": 12
-                    }
+                    "min": -8,
+                    "max": 12
                 }],
                 "yAxes": [{
                     "display": false
index 8322ef472e474e4b326c81ca3d415af0d63866b5..0715f7f8ab0a950cb4b6b0fcbd5f3765b277c16e 100644 (file)
                 "yAxes": [{
                     "display": false,
                     "stacked": true,
-                    "ticks": {
-                        "min": -8,
-                        "max": 12
-                    }
+                    "min": -8,
+                    "max": 12
                 }]
             }
         }
index d91b61f1b581c3f04ec8a7e774f5e59a3ca4622a..8f808cef2d86ba32c99fbca6c694fa5c1b7735b9 100644 (file)
                 "xAxes": [{
                     "display": false,
                     "stacked": true,
-                    "ticks": {
-                        "min": -8,
-                        "max": 12
-                    }
+                    "min": -8,
+                    "max": 12
                 }],
                 "yAxes": [{
                     "display": false,
index caeaa23966849c3acdbf6b01793958c818847aed..76e4d4066fe50d3e007f91c584869d9686575ef9 100644 (file)
             "scales": {
                 "xAxes": [{
                     "display": false,
-                    "ticks": {
-                        "min": -8,
-                        "max": 12
-                    }
+                    "min": -8,
+                    "max": 12
                 }],
                 "yAxes": [{
                     "display": false
index 53f25a93705b797a0678016bfe59693f0f30f86b..99ac49df242508a80d4171ccb6f9da70d9f5e04c 100644 (file)
@@ -26,9 +26,7 @@
                 "yAxes": [{
                     "display": false,
                     "stacked": true,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index d4f497b020983abd902142416567bf839c727621..23988211ad58d3fb3d7195fda172c2d1b10c312b 100644 (file)
@@ -29,9 +29,7 @@
                 "yAxes": [{
                     "display": false,
                     "stacked": true,
-                    "ticks": {
-                        "beginAtZero": true
-                    }
+                    "beginAtZero": true
                 }]
             }
         }
index 9502ad1cd830e70146469579f2fcaa2fbeebb33a..1af0dfc849ce604e77ca9771050b86d2d5ed0a32 100644 (file)
@@ -16,11 +16,11 @@ module.exports = {
                        scales: {
                                xAxes: [{ticks: {display: false}}],
                                yAxes: [{
+                                       min: 8,
+                                       max: 25,
+                                       beginAtZero: true,
                                        ticks: {
-                                               display: false,
-                                               min: 8,
-                                               max: 25,
-                                               beginAtZero: true
+                                               display: false
                                        }
                                }]
                        }
index 9849eef8c903a729406c34c8d2d144fea267935d..e1af5d550903ecff5efb95654859942a221b8253 100644 (file)
                 "xAxes": [{"display": false}],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "min": 0,
-                        "max": 4
-                    }
+                    "min": 0,
+                    "max": 4
                 }]
             },
             "elements": {
index 2171e6696b927d77dc89fe96af8f5e07b5b9d9d9..3909168a98ec44ae3f8cd927dc74b70c1ecd4f71 100644 (file)
@@ -45,9 +45,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index ee56376fcea699bad0b7a44c958a030ed664c993..c6221948e2dcdf4ce54edb1dc8ce6bf2b60d7b75 100644 (file)
@@ -51,9 +51,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index e767799ead78d80358756add44375b135c72c364..d35b4823d314384e5624e5536bf6937d9d7f6cd9 100644 (file)
@@ -48,9 +48,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 4a5def54c7c5d6915c8d8568e2a29a104474e251..b19f17b794c8868eaeb9b94c1de8c25161a582bc 100644 (file)
@@ -39,9 +39,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 34d736a191ff0e0573595edd1ed61d4ad9e6bebb..cc959799e7b5822ca9b254e92bd190a2b76bbd5d 100644 (file)
@@ -46,9 +46,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index f69182d1f518b7a1c8e6e52be6c3d46e59664c82..91dc5178e533238c548e7c2ebb5fe2968ef3df83 100644 (file)
@@ -17,8 +17,8 @@
             "title": false,
             "scales": {
                 "xAxes": [{
+                    "max": 3,
                     "ticks": {
-                        "max": 3,
                         "display": false
                     }
                 }],
index b4a4b0c3e400f1a9d81390286c84ec21b7208ccc..ae229dba89e3f82b5e897af77d54aba2ef9c3c1f 100644 (file)
@@ -17,8 +17,8 @@
             "title": false,
             "scales": {
                 "xAxes": [{
+                    "min": -2,
                     "ticks": {
-                        "min": -2,
                         "display": false
                     }
                 }],
index 79dc08cd9b79c66776c8e9ec24da1c71b906e06f..e74f0bc125082cf4c753fadc26c51dc90b829a5a 100644 (file)
@@ -17,9 +17,9 @@
             "title": false,
             "scales": {
                 "xAxes": [{
+                    "min": -2,
+                    "max": 3,
                     "ticks": {
-                        "min": -2,
-                        "max": 3,
                         "display": false
                     }
                 }],
index 1ab631bb4e6545fe4c2e452c7423a09c7aefae3a..589fc1e716a879733ba2bd846d02ac71ef2fbb32 100644 (file)
@@ -18,8 +18,8 @@
             "scales": {
                 "xAxes": [{"ticks": {"display": false}}],
                 "yAxes": [{
+                    "max": 6,
                     "ticks": {
-                        "max": 6,
                         "display": false
                     }
                 }]
index 7c6114a9c29a7082dda00fe2f4809a447287b4a3..3085fffa1f0b2bd90030fd8ba0260c1c9090d464 100644 (file)
@@ -18,8 +18,8 @@
             "scales": {
                 "xAxes": [{"ticks": {"display": false}}],
                 "yAxes": [{
+                    "min": 2,
                     "ticks": {
-                        "min": 2,
                         "display": false
                     }
                 }]
index 30751446aa35a8ffaa9b5ee908bac1421d3d9f3f..06b63426819ca10438db621165bd962b5a64c208 100644 (file)
@@ -18,9 +18,9 @@
             "scales": {
                 "xAxes": [{"ticks": {"display": false}}],
                 "yAxes": [{
+                    "min": 2,
+                    "max": 6,
                     "ticks": {
-                        "min": 2,
-                        "max": 6,
                         "display": false
                     }
                 }]
index 5885240c7e903f7a0cb42548dd3f85f6432500ef..712dc5bf077822a260d4805289ccbf7f5db2d221 100644 (file)
             "title": false,
             "scales": {
                 "xAxes": [{
+                    "min": -2,
+                    "max": 2,
                     "ticks": {
-                        "min": -2,
-                        "max": 2,
                         "display": false
                     }
                 }],
                 "yAxes": [{
+                    "min": -2,
+                    "max": 2,
                     "ticks": {
-                        "min": -2,
-                        "max": 2,
                         "display": false
                     }
                 }]
index ef295ad59143ea3b2698ac0d307e73fec2e47d57..7e50e7210964e4f0690c9e219487e95a8bdf1d58 100644 (file)
                 "xAxes": [{"display": false}],
                 "yAxes": [{
                     "display": false,
-                    "ticks": {
-                        "min": 0,
-                        "max": 4
-                    }
+                    "min": 0,
+                    "max": 4
                 }]
             },
             "elements": {
index 6ede2cb0c15c6188a9e4672a1f33ffec1704031a..5edfbdcd5fe4cb147e218c36210e180adb40a2d0 100644 (file)
@@ -44,9 +44,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 04b12360647de758fc33e244e59c650b23be532b..3be7968958dc8aac1a42546665cef78745a77d6b 100644 (file)
@@ -44,9 +44,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index a40ac1cb0a45ba272062b678f9a4b33c56f25f52..01e2967ec5378e404005bb3a1c3ddebcfafabd3e 100644 (file)
@@ -44,9 +44,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index c2a48ce82497a3ae69ca3db6c6bfd4b9bc9995ff..05f8161d6aa4465df2f6da808e95b28bd1267294 100644 (file)
@@ -48,9 +48,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 7e2068a4f911d61fd02285e7245b84e7f89ca036..3d1f529074aad1cf0a7ae635e974506011d3d161 100644 (file)
@@ -43,9 +43,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 5a130f29e878e68ee4a3c189dac30824a2157169..5d5b009e37041cf97b87fa866e4a2d0fed439243 100644 (file)
@@ -45,9 +45,7 @@ module.exports = {
                                yAxes: [
                                        {
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }
                                ]
                        }
index 4c714a4512086aea1985cfd696d22cfd08681674..ee32bcf422e61368b0975e2f91d07434bf667701 100644 (file)
@@ -39,9 +39,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index d9347ee5d7341929da6892a7473c7572ad761f95..0decaa6c079166027a94b7c55f459fb4a291f828 100644 (file)
@@ -28,9 +28,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 128bf6e7001f3b63fca428340102924dbd56eba2..f0db0da675bec68a1ab8c2adfd2cd049a56a0b97 100644 (file)
@@ -48,9 +48,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       beginAtZero: true
-                               }
+                               beginAtZero: true
                        }
                }
        },
index ad6aa1fedc15c0e6921d081f06bb52171d855ab1..6de72cba8cd3bbeffa2ba3ad78dc2ff0aacd4f9c 100644 (file)
@@ -39,9 +39,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       beginAtZero: true
-                               }
+                               beginAtZero: true
                        }
                }
        },
index e4b59c58086e4110a3579cd5e5756d9747f4c2bf..c1cdbb6f84666fa2ba6bf2d8bc2db1144ec1bfd7 100644 (file)
@@ -42,9 +42,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index c70ac64363fd4788410f39c8ce06702aab686b90..e0e677f2638bc67999cbeb751a2fa81cf05bc2b8 100644 (file)
@@ -30,9 +30,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 0bee9a8a6697f4d6b8485bc6da43b22a9b01c81d..0feed22cc0cc55c4b55f862712bba09d31320a7e 100644 (file)
@@ -33,9 +33,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index a5e7ee833737c9e016b8c9653c5b3f3ab740b7da..92439aab82550dd008575271d4e93adaf190848b 100644 (file)
@@ -31,9 +31,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 90cca36fedb30143c2117c230e75995c69cb48e1..9f8a6e879970eaa85f4f403edca82a670f4aae90 100644 (file)
@@ -40,9 +40,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -1
-                               }
+                               min: -1
                        }
                }
        },
index f96d4cd1372e4b7c9223aaa8a2d5d49f7d54c44f..c26805e14dfc86f005787a0c109f5f6a2dc40666 100644 (file)
@@ -36,9 +36,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -1
-                               }
+                               min: -1
                        }
                }
        },
index ff33d60dacc37183c97dc3a18a5c664ecefe9b39..435af723025b26e5dfbc108fbb005b921f7f869b 100644 (file)
@@ -48,9 +48,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       beginAtZero: true
-                               }
+                               beginAtZero: true
                        }
                }
        },
index 04a6beb66f1643ff2bd17cdec369137ba8be28ef..580ef743e73ee3a65c66118bb338d67644f0c83d 100644 (file)
@@ -39,9 +39,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       beginAtZero: true
-                               }
+                               beginAtZero: true
                        }
                }
        },
index d2399d798ccc5f25376209e20612c71b418a62f0..adf8338b8fd12184194bf5b0b4a1ccc786a75331 100644 (file)
@@ -40,9 +40,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 521cbf076c8c346aa228e15106ad313249e6425e..29c7e57803e98814c1a7168919cd0b4827545549 100644 (file)
@@ -31,9 +31,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 3706bbff150b9a4be55ccf40c6fd8f8de799e5d3..b57599c075f23e27a72a691a8d6d1d378bb23d63 100644 (file)
@@ -31,9 +31,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 4db74dad12eb576e4ffd5491521996caf1edc813..f2c21f645d070d8a3f642445f30e1de860e452e1 100644 (file)
@@ -27,9 +27,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 913c1cb87cde7700d2f20efb07d4c4c3569a3ddd..8fea82502d14aee478adecf536f691e49bae3ea7 100644 (file)
             "title": false,
             "scale": {
                 "display": false,
-                "ticks": {
-                    "min": 0,
-                    "max": 3
-                }
+                "min": 0,
+                "max": 3
             },
             "elements": {
                 "line": {
index 10148e65e020ce31d1b0c624cc07e328e2b1bb31..d3f44572c71c428b70c1df2efe1215ef1d098047 100644 (file)
@@ -43,9 +43,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 07e1b129cf3129efcdc4f5b6dd430c04fc22160f..edc160efff4026d61345a865b4628e10ecac2536 100644 (file)
@@ -41,9 +41,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 20af577ced1f036e21de3b98fae7ad77f2525397..4688dc32ae23c6aad9aa7a7b93c44cda705d661e 100644 (file)
@@ -29,9 +29,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index f7e0626d65b2ac34eeaafbd05e24df4179f58e51..45fb8e2750560892cdd506a8e0df79bceb10f3a2 100644 (file)
@@ -44,9 +44,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index d9678c311ce777b25b3b8af469988227e7548fb1..4e343c50ae8904ba0fc8bc17f522efcf2e09bb76 100644 (file)
@@ -42,9 +42,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index d639e2816fdc67072dae94e239c3f2fd9e66eff4..3e80106d0532a4de7aa60df9879bc90bc3a409ad 100644 (file)
@@ -30,9 +30,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 1e60832e64611451d5c684b334bfe92d2d84ee15..2c6b6b5ce58ed3b695701f9ac4c63d4fe2219559 100644 (file)
@@ -35,9 +35,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 94ea514ca705713c1dc10d714428a137dffad61f..51e77e4a7d3a38b772385279d7ee9545fb64ebb7 100644 (file)
@@ -41,9 +41,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index b486ea93702b2781dea91d4956327cfb68981969..74bd417001c2e03ffdd975c0bafae23dad726169 100644 (file)
@@ -31,9 +31,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 835cd2350cd6830dba29a12ec75a683bcce3fb09..55b52a601e37684ba18735257756d6e585eb301c 100644 (file)
@@ -47,9 +47,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 9301672fbb2e567c9896927047f4c2bc6ed96fd1..dbf2e9a26045041b2053aba29e7fe3a366ed80bf 100644 (file)
@@ -45,9 +45,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 31c2ff941a45d4584cb5637d552b71598466f6c0..beab6ed687c300b20d3fc7ade7aef77d6d3d4909 100644 (file)
@@ -31,9 +31,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 7a106b58735d70e7b3cddc04397e963610b63661..b052d88b64b2abb5d777dfcaa4e756db96de0caf 100644 (file)
@@ -34,9 +34,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index bbc5cdeb2a4225e4cd746351c7608ed1d2ced501..69ca5777dfb379c75873cf249e5c3da31f19250a 100644 (file)
@@ -40,9 +40,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index d7f85687bec0bab1636df89f5470a3b7313c6b94..42a0cf00de551dc549cad5b12c5c7c314a188712 100644 (file)
@@ -30,9 +30,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index f516ce75f5733f433869e3099fe4429f2a160a3b..5b4f69dfc6dfee8f637c0c1765116a25181e947a 100644 (file)
@@ -36,9 +36,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index d85b7c97e827357ec234d8f576ad59bb78f392dc..6a5d7f33f82b469031cda255ab08568f0b9b4eef 100644 (file)
@@ -42,9 +42,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 4b9b17d081d120f4c383116f45dcecec410bbdfc..b842151c84e8d4ff8354dbcfe522ebdd8a628553 100644 (file)
@@ -32,9 +32,7 @@ module.exports = {
                        },
                        scale: {
                                display: false,
-                               ticks: {
-                                       min: -15
-                               }
+                               min: -15
                        }
                }
        },
index 7a0aa03ec0cbc901737d75e464de18222fa8e0fa..d7412edb3970f806cc71a07bec29059a79cd5080 100644 (file)
                     "position": "left",
                     "id": "y-axis-1",
                     "type": "linear",
+                    "min": -100,
+                    "max": 100,
                     "ticks": {
-                        "display": false,
-                        "min": -100,
-                        "max": 100
+                        "display": false
                     },
                     "gridLines":{
                         "drawOnChartArea": false,
                     "type": "linear",
                     "id": "y-axis-2",
                     "position": "right",
+                    "min": 0,
+                    "max": 50,
                     "ticks": {
-                        "display": false,
-                        "min": 0,
-                        "max": 50
+                        "display": false
                     },
                     "gridLines":{
                         "drawOnChartArea": false,
index 718faa9cce235226cbab0e7eae939bf409031bf4..2cbbaed38881cacab34f210f9b3546c9d919983e 100644 (file)
@@ -12,8 +12,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 1e65f6337ad723442550f7fdf3127b4c01e345d1..6f8b82299a7e70e2e740d7d5dfb27b1cf7db9da2 100644 (file)
@@ -15,8 +15,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 4e29d28284ffaf3843b1dcaecf7767b99369ea50..a76e6dea89ba0edfa836cd912488e65eefd88c9f 100644 (file)
@@ -16,8 +16,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 5637cb526eab6f490dfa270dd51043f33c969ae8..76f9d79e5ae75f0dfc99132d6efcc0f38fe68729 100644 (file)
@@ -15,8 +15,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index f479ea079913e2da97b1dcbde76f8490158a2307..36ec82ad81fc6f5cff9016cf3bba72cecc9550ce 100644 (file)
@@ -16,8 +16,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index cb294564fbcf185f2f416717829dfe5ae678d266..7d0a9b8b8ea4a280fcf05517a01d8d38eb0ef85a 100644 (file)
@@ -15,8 +15,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 75a3c155f1ac48ef326a8583e84f7630f015876c..9f0798b43c281061a11855c357bf9a4deb89b6a7 100644 (file)
@@ -16,8 +16,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 80411e9c881c5208e44badd3b5f73439af146b42..a2392ea9ed7f2fd05de475d87222e3d5101d2b07 100644 (file)
@@ -15,8 +15,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 43e5668dc1199945f95f71c5f5c1b768e587b056..fd7fbe693ff6c46c7ad70de32d2f652660bba7bc 100644 (file)
@@ -16,8 +16,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index e304473659182db6dcdbe3e300eb9c8a71e6d56e..51c82c43410a30dc5e908690e482f541851e63cf 100644 (file)
@@ -16,8 +16,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 88b286ffa6630d03e1d196c7577291bf94270ace..641b3a711879d6acaab9ff4e27826c0798f673b9 100644 (file)
@@ -16,8 +16,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 3008aef6eab9fe1582d95081329d61c1b93d91e3..775e8a71c0364758858493ec99b3ae15439edde0 100644 (file)
@@ -16,8 +16,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index c12485925aed58bef9c14c335a18e8ab79754db9..f91a6c446093ba2605d332107aa52196d483d656 100644 (file)
@@ -14,8 +14,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 7210a7d6bbad9a9672441d9681ff3b958a5efcb8..2ac89f8e5bf0452eb0e2cc1e5837e99959a3b1fe 100644 (file)
@@ -15,8 +15,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 63fd548e212502c172b022b0b2ff1d6a9529252a..915a9c3a098f2dbc06bc5fd675d16565be95027d 100644 (file)
@@ -15,8 +15,8 @@ module.exports = {
                        legend: false,
                        title: false,
                        scales: {
-                               xAxes: [{type: 'linear', display: false, ticks: {min: 0, max: 20}}],
-                               yAxes: [{display: false, ticks: {min: -15, max: 15}}]
+                               xAxes: [{type: 'linear', display: false, min: 0, max: 20}],
+                               yAxes: [{display: false, min: -15, max: 15}]
                        }
                }
        },
index 558770f7a2dc8886a80d13f4340b2a1a319ec46a..67f72d6bfc7509deed2878cacccb66bd0e7fa75b 100644 (file)
@@ -886,10 +886,8 @@ describe('Chart.controllers.bar', function() {
                                                type: 'linear',
                                                display: false,
                                                stacked: true,
-                                               ticks: {
-                                                       min: 50,
-                                                       max: 100
-                                               }
+                                               min: 50,
+                                               max: 100
                                        }]
                                }
                        }
@@ -1514,10 +1512,8 @@ describe('Chart.controllers.bar', function() {
                                options: {
                                        scales: {
                                                xAxes: [{
-                                                       ticks: {
-                                                               min: 'March',
-                                                               max: 'May',
-                                                       },
+                                                       min: 'March',
+                                                       max: 'May',
                                                }]
                                        }
                                }
@@ -1531,10 +1527,8 @@ describe('Chart.controllers.bar', function() {
                                options: {
                                        scales: {
                                                xAxes: [{
-                                                       ticks: {
-                                                               min: 'March',
-                                                               max: 'May',
-                                                       }
+                                                       min: 'March',
+                                                       max: 'May',
                                                }],
                                                yAxes: [{
                                                        stacked: true
@@ -1592,10 +1586,8 @@ describe('Chart.controllers.bar', function() {
                                options: {
                                        scales: {
                                                yAxes: [{
-                                                       ticks: {
-                                                               min: 'March',
-                                                               max: 'May',
-                                                       },
+                                                       min: 'March',
+                                                       max: 'May',
                                                }]
                                        }
                                }
@@ -1612,10 +1604,8 @@ describe('Chart.controllers.bar', function() {
                                                        stacked: true
                                                }],
                                                yAxes: [{
-                                                       ticks: {
-                                                               min: 'March',
-                                                               max: 'May',
-                                                       }
+                                                       min: 'March',
+                                                       max: 'May',
                                                }]
                                        }
                                }
index 5e811cb4d9ae4196796ff8a1859c213a8d495015..39157bb8bc62811e879bd1215e187425e725e5f3 100644 (file)
@@ -251,9 +251,7 @@ describe('Chart.controllers.line', function() {
                                        }],
                                        yAxes: [{
                                                display: false,
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }]
                                }
                        }
index 5dc8bf81a332a5e0a0532c7401cdebf6c17dd9cc..e8a37da58e9ca7db63699c925aa7941e3554e02e 100644 (file)
@@ -990,18 +990,16 @@ describe('Chart', function() {
                                responsive: false,
                                scales: {
                                        yAxes: [{
-                                               ticks: {
-                                                       min: 0,
-                                                       max: 10
-                                               }
+                                               min: 0,
+                                               max: 10
                                        }]
                                }
                        };
                        chart.update();
 
                        var yScale = chart.scales['y-axis-0'];
-                       expect(yScale.options.ticks.min).toBe(0);
-                       expect(yScale.options.ticks.max).toBe(10);
+                       expect(yScale.options.min).toBe(0);
+                       expect(yScale.options.max).toBe(10);
                });
 
                it ('should update scales options', function() {
@@ -1018,13 +1016,13 @@ describe('Chart', function() {
                                }
                        });
 
-                       chart.options.scales.yAxes[0].ticks.min = 0;
-                       chart.options.scales.yAxes[0].ticks.max = 10;
+                       chart.options.scales.yAxes[0].min = 0;
+                       chart.options.scales.yAxes[0].max = 10;
                        chart.update();
 
                        var yScale = chart.scales['y-axis-0'];
-                       expect(yScale.options.ticks.min).toBe(0);
-                       expect(yScale.options.ticks.max).toBe(10);
+                       expect(yScale.options.min).toBe(0);
+                       expect(yScale.options.max).toBe(10);
                });
 
                it ('should update scales options from new object', function() {
@@ -1043,10 +1041,8 @@ describe('Chart', function() {
 
                        var newScalesConfig = {
                                yAxes: [{
-                                       ticks: {
-                                               min: 0,
-                                               max: 10
-                                       }
+                                       min: 0,
+                                       max: 10
                                }]
                        };
                        chart.options.scales = newScalesConfig;
@@ -1054,8 +1050,8 @@ describe('Chart', function() {
                        chart.update();
 
                        var yScale = chart.scales['y-axis-0'];
-                       expect(yScale.options.ticks.min).toBe(0);
-                       expect(yScale.options.ticks.max).toBe(10);
+                       expect(yScale.options.min).toBe(0);
+                       expect(yScale.options.max).toBe(10);
                });
 
                it ('should assign unique scale IDs', function() {
@@ -1089,10 +1085,8 @@ describe('Chart', function() {
                                        scales: {
                                                yAxes: [{
                                                        id: 'yAxis0',
-                                                       ticks: {
-                                                               min: 0,
-                                                               max: 10
-                                                       }
+                                                       min: 0,
+                                                       max: 10
                                                }]
                                        }
                                }
@@ -1100,10 +1094,8 @@ describe('Chart', function() {
 
                        var newScalesConfig = {
                                yAxes: [{
-                                       ticks: {
-                                               min: 0,
-                                               max: 10
-                                       }
+                                       min: 0,
+                                       max: 10
                                }]
                        };
                        chart.options.scales = newScalesConfig;
@@ -1113,8 +1105,8 @@ describe('Chart', function() {
                        var yScale = chart.scales.yAxis0;
                        expect(yScale).toBeUndefined();
                        var newyScale = chart.scales['y-axis-0'];
-                       expect(newyScale.options.ticks.min).toBe(0);
-                       expect(newyScale.options.ticks.max).toBe(10);
+                       expect(newyScale.options.min).toBe(0);
+                       expect(newyScale.options.max).toBe(10);
                });
 
                it ('should update tooltip options', function() {
index 413b014ee534871ff4cccc3f14decb16140753c7..23fd5da823dfdbd99ded3ca6b537ab0463c0cd15 100644 (file)
@@ -598,10 +598,8 @@ describe('Core.scale', function() {
                                                xAxes: [{
                                                        id: 'x',
                                                        type: 'linear',
-                                                       ticks: {
-                                                               min: -20,
-                                                               max: 20
-                                                       }
+                                                       min: -20,
+                                                       max: 20
                                                }],
                                                yAxes: [{
                                                        id: 'y',
index 2dedaac1155ffb2ce88a5b7101dcc1478940ef82..459a9869b0c428505612d037412a1563e136bda4 100644 (file)
@@ -69,9 +69,9 @@ describe('Test tick generators', function() {
                                        xAxes: [{
                                                type: 'logarithmic',
                                                position: 'bottom',
+                                               min: 0.1,
+                                               max: 1,
                                                ticks: {
-                                                       min: 0.1,
-                                                       max: 1,
                                                        callback: function(value) {
                                                                return value.toString();
                                                        }
@@ -79,9 +79,9 @@ describe('Test tick generators', function() {
                                        }],
                                        yAxes: [{
                                                type: 'logarithmic',
+                                               min: 0.1,
+                                               max: 1,
                                                ticks: {
-                                                       min: 0.1,
-                                                       max: 1,
                                                        callback: function(value) {
                                                                return value.toString();
                                                        }
index 99a7636e21eaa9ce00aeeb35d043a3423fcbdde7..ca7c9e8e92537763d5ecd6b7d6b720818adce30a 100644 (file)
@@ -19,6 +19,8 @@ describe('Category scale tests', function() {
                var defaultConfig = Chart.scaleService.getScaleDefaults('category');
                expect(defaultConfig).toEqual({
                        display: true,
+                       reverse: false,
+                       beginAtZero: false,
 
                        gridLines: {
                                color: 'rgba(0,0,0,0.1)',
@@ -36,12 +38,10 @@ describe('Category scale tests', function() {
                        offset: false,
                        scaleLabel: Chart.defaults.scale.scaleLabel,
                        ticks: {
-                               beginAtZero: false,
                                minRotation: 0,
                                maxRotation: 50,
                                mirror: false,
                                padding: 0,
-                               reverse: false,
                                display: true,
                                callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
                                autoSkip: true,
@@ -281,10 +281,8 @@ describe('Category scale tests', function() {
                                                id: 'xScale0',
                                                type: 'category',
                                                position: 'bottom',
-                                               ticks: {
-                                                       min: 'tick2',
-                                                       max: 'tick4'
-                                               }
+                                               min: 'tick2',
+                                               max: 'tick4'
                                        }],
                                        yAxes: [{
                                                id: 'yScale0',
@@ -373,10 +371,8 @@ describe('Category scale tests', function() {
                                                id: 'yScale0',
                                                type: 'category',
                                                position: 'left',
-                                               ticks: {
-                                                       min: '2',
-                                                       max: '4'
-                                               }
+                                               min: '2',
+                                               max: '4'
                                        }]
                                }
                        }
index 4e8a7c83795edf34091851c521b1d0b0b24587e6..9a7c44fbadd414707d850aef24a57687da6d56b9 100644 (file)
@@ -13,7 +13,6 @@ describe('Linear Scale', function() {
                var defaultConfig = Chart.scaleService.getScaleDefaults('linear');
                expect(defaultConfig).toEqual({
                        display: true,
-
                        gridLines: {
                                color: 'rgba(0,0,0,0.1)',
                                drawBorder: true,
@@ -28,14 +27,14 @@ describe('Linear Scale', function() {
                        },
                        position: 'left',
                        offset: false,
+                       reverse: false,
+                       beginAtZero: false,
                        scaleLabel: Chart.defaults.scale.scaleLabel,
                        ticks: {
-                               beginAtZero: false,
                                minRotation: 0,
                                maxRotation: 50,
                                mirror: false,
                                padding: 0,
-                               reverse: false,
                                display: true,
                                callback: defaultConfig.ticks.callback, // make this work nicer, then check below
                                autoSkip: true,
@@ -132,10 +131,8 @@ describe('Linear Scale', function() {
                                        yAxes: [{
                                                id: 'yScale0',
                                                type: 'linear',
-                                               ticks: {
-                                                       suggestedMin: -10,
-                                                       suggestedMax: 15
-                                               }
+                                               suggestedMin: -10,
+                                               suggestedMax: 15
                                        }]
                                }
                        }
@@ -469,9 +466,7 @@ describe('Linear Scale', function() {
                                        yAxes: [{
                                                id: 'yScale0',
                                                type: 'linear',
-                                               ticks: {
-                                                       beginAtZero: true
-                                               }
+                                               beginAtZero: true
                                        }]
                                }
                        }
@@ -497,10 +492,8 @@ describe('Linear Scale', function() {
                                        yAxes: [{
                                                id: 'yScale0',
                                                type: 'linear',
-                                               ticks: {
-                                                       suggestedMax: 10,
-                                                       suggestedMin: -10
-                                               }
+                                               suggestedMax: 10,
+                                               suggestedMin: -10
                                        }]
                                }
                        }
@@ -526,10 +519,8 @@ describe('Linear Scale', function() {
                                        yAxes: [{
                                                id: 'yScale0',
                                                type: 'linear',
-                                               ticks: {
-                                                       max: 1010,
-                                                       min: -1010
-                                               }
+                                               max: 1010,
+                                               min: -1010
                                        }]
                                }
                        }
@@ -558,9 +549,9 @@ describe('Linear Scale', function() {
                                        yAxes: [{
                                                id: 'yScale0',
                                                type: 'linear',
+                                               min: 1,
+                                               max: 11,
                                                ticks: {
-                                                       min: 1,
-                                                       max: 11,
                                                        stepSize: 2
                                                }
                                        }]
@@ -687,7 +678,7 @@ describe('Linear Scale', function() {
                expect(chart.scales.yScale0).not.toEqual(undefined); // must construct
                expect(getLabels(chart.scales.yScale0)).toEqual(['50', '45', '40', '35', '30', '25', '20']);
 
-               chart.scales.yScale0.options.ticks.beginAtZero = true;
+               chart.scales.yScale0.options.beginAtZero = true;
                chart.update();
                expect(getLabels(chart.scales.yScale0)).toEqual(['50', '45', '40', '35', '30', '25', '20', '15', '10', '5', '0']);
 
@@ -695,7 +686,7 @@ describe('Linear Scale', function() {
                chart.update();
                expect(getLabels(chart.scales.yScale0)).toEqual(['0', '-5', '-10', '-15', '-20', '-25', '-30', '-35', '-40', '-45', '-50']);
 
-               chart.scales.yScale0.options.ticks.beginAtZero = false;
+               chart.scales.yScale0.options.beginAtZero = false;
                chart.update();
                expect(getLabels(chart.scales.yScale0)).toEqual(['-20', '-25', '-30', '-35', '-40', '-45', '-50']);
        });
@@ -715,9 +706,7 @@ describe('Linear Scale', function() {
                                        yAxes: [{
                                                id: 'yScale0',
                                                type: 'linear',
-                                               ticks: {
-                                                       reverse: true
-                                               }
+                                               reverse: true
                                        }]
                                }
                        }
@@ -790,8 +779,8 @@ describe('Linear Scale', function() {
 
                expect(getLabels(chart.scales.yScale)).toEqual(['2.5', '2.0', '1.5', '1.0', '0.5']);
 
-               chart.options.scales.yAxes[0].ticks.min = 0.3;
-               chart.options.scales.yAxes[0].ticks.max = 2.8;
+               chart.options.scales.yAxes[0].min = 0.3;
+               chart.options.scales.yAxes[0].max = 2.8;
                chart.update();
 
                expect(getLabels(chart.scales.yScale)).toEqual(['2.8', '2.5', '2.0', '1.5', '1.0', '0.5', '0.3']);
@@ -1057,9 +1046,7 @@ describe('Linear Scale', function() {
                        options: {
                                scales: {
                                        xAxes: [{
-                                               ticks: {
-                                                       min: 20
-                                               }
+                                               min: 20
                                        }]
                                }
                        }
@@ -1085,10 +1072,8 @@ describe('Linear Scale', function() {
                        options: {
                                scales: {
                                        xAxes: [{
-                                               ticks: {
-                                                       min: 0,
-                                                       max: 3000
-                                               }
+                                               min: 0,
+                                               max: 3000
                                        }]
                                }
                        }
@@ -1113,10 +1098,8 @@ describe('Linear Scale', function() {
                        options: {
                                scales: {
                                        xAxes: [{
-                                               ticks: {
-                                                       min: -3000,
-                                                       max: 0
-                                               }
+                                               min: -3000,
+                                               max: 0
                                        }]
                                }
                        }
@@ -1179,7 +1162,7 @@ describe('Linear Scale', function() {
                expect(scale.getValueForPixel(end)).toBeCloseTo(max, 4);
                expect(scale.getValueForPixel(start)).toBeCloseTo(min, 4);
 
-               scale.options.ticks.reverse = true;
+               scale.options.reverse = true;
                chart.update();
 
                start = chart.chartArea.left;
@@ -1220,7 +1203,7 @@ describe('Linear Scale', function() {
                expect(scale.getValueForPixel(end)).toBeCloseTo(max, 4);
                expect(scale.getValueForPixel(start)).toBeCloseTo(min, 4);
 
-               scale.options.ticks.reverse = true;
+               scale.options.reverse = true;
                chart.update();
 
                start = chart.chartArea.bottom;
index 78de94635d3c686427917fd6554777f2f7657a1d..878ea545fdd3abde34e99b6b928f6bf782372cb7 100644 (file)
@@ -27,14 +27,14 @@ describe('Logarithmic Scale tests', function() {
                        },
                        position: 'left',
                        offset: false,
+                       reverse: false,
+                       beginAtZero: false,
                        scaleLabel: Chart.defaults.scale.scaleLabel,
                        ticks: {
-                               beginAtZero: false,
                                minRotation: 0,
                                maxRotation: 50,
                                mirror: false,
                                padding: 0,
-                               reverse: false,
                                display: true,
                                callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
                                autoSkip: true,
@@ -457,9 +457,9 @@ describe('Logarithmic Scale tests', function() {
                                        yAxes: [{
                                                id: 'yScale',
                                                type: 'logarithmic',
+                                               min: 10,
+                                               max: 1010,
                                                ticks: {
-                                                       min: 10,
-                                                       max: 1010,
                                                        callback: function(value) {
                                                                return value;
                                                        }
@@ -491,9 +491,9 @@ describe('Logarithmic Scale tests', function() {
                                        yAxes: [{
                                                id: 'yScale',
                                                type: 'logarithmic',
+                                               min: -10,
+                                               max: -1010,
                                                ticks: {
-                                                       min: -10,
-                                                       max: -1010,
                                                        callback: function(value) {
                                                                return value;
                                                        }
@@ -522,9 +522,9 @@ describe('Logarithmic Scale tests', function() {
                                        yAxes: [{
                                                id: 'yScale',
                                                type: 'logarithmic',
+                                               min: 'zero',
+                                               max: null,
                                                ticks: {
-                                                       min: 'zero',
-                                                       max: null,
                                                        callback: function(value) {
                                                                return value;
                                                        }
@@ -616,8 +616,8 @@ describe('Logarithmic Scale tests', function() {
                                        yAxes: [{
                                                id: 'yScale',
                                                type: 'logarithmic',
+                                               reverse: true,
                                                ticks: {
-                                                       reverse: true,
                                                        callback: function(value) {
                                                                return value;
                                                        }
@@ -647,8 +647,8 @@ describe('Logarithmic Scale tests', function() {
                                        yAxes: [{
                                                id: 'yScale',
                                                type: 'logarithmic',
+                                               reverse: true,
                                                ticks: {
-                                                       reverse: true,
                                                        callback: function(value) {
                                                                return value;
                                                        }
@@ -781,26 +781,22 @@ describe('Logarithmic Scale tests', function() {
                                axis: 'y',
                                scale: {
                                        yAxes: [{
-                                               ticks: {
-                                                       min: 0
-                                               }
+                                               min: 0
                                        }]
                                },
                                firstTick: 0,
-                               describe: 'all stacks are defined and ticks.min: 0'
+                               describe: 'all stacks are defined and min: 0'
                        },
                        {
                                axis: 'y',
                                data: dataWithEmptyStacks,
                                scale: {
                                        yAxes: [{
-                                               ticks: {
-                                                       min: 0
-                                               }
+                                               min: 0
                                        }]
                                },
                                firstTick: 0,
-                               describe: 'not stacks are defined and ticks.min: 0'
+                               describe: 'not stacks are defined and min: 0'
                        },
                        {
                                axis: 'x',
@@ -817,26 +813,22 @@ describe('Logarithmic Scale tests', function() {
                                axis: 'x',
                                scale: {
                                        xAxes: [{
-                                               ticks: {
-                                                       min: 0
-                                               }
+                                               min: 0
                                        }]
                                },
                                firstTick: 0,
-                               describe: 'all stacks are defined and ticks.min: 0'
+                               describe: 'all stacks are defined and min: 0'
                        },
                        {
                                axis: 'x',
                                data: dataWithEmptyStacks,
                                scale: {
                                        xAxes: [{
-                                               ticks: {
-                                                       min: 0
-                                               }
+                                               min: 0
                                        }]
                                },
                                firstTick: 0,
-                               describe: 'not all stacks are defined and ticks.min: 0'
+                               describe: 'not all stacks are defined and min: 0'
                        },
                ];
                config.forEach(function(setup) {
@@ -886,7 +878,7 @@ describe('Logarithmic Scale tests', function() {
                                        expect(scale.getValueForPixel(start)).toBeCloseTo(firstTick, 4);
                                        expect(scale.getValueForPixel(end)).toBeCloseTo(lastTick, 4);
 
-                                       chart.scales[axisID].options.ticks.reverse = true; // Reverse mode
+                                       chart.scales[axisID].options.reverse = true; // Reverse mode
                                        chart.update();
 
                                        // chartArea might have been resized in update
@@ -909,14 +901,14 @@ describe('Logarithmic Scale tests', function() {
                                dataset: [],
                                firstTick: 1, // value of the first tick
                                lastTick: 10, // value of the last tick
-                               describe: 'empty dataset, without ticks.min/max'
+                               describe: 'empty dataset, without min/max'
                        },
                        {
                                dataset: [],
                                scale: {stacked: true},
                                firstTick: 1,
                                lastTick: 10,
-                               describe: 'empty dataset, without ticks.min/max, with stacked: true'
+                               describe: 'empty dataset, without min/max, with stacked: true'
                        },
                        {
                                data: {
@@ -928,7 +920,7 @@ describe('Logarithmic Scale tests', function() {
                                type: 'bar',
                                firstTick: 1,
                                lastTick: 10,
-                               describe: 'empty dataset with stack option, without ticks.min/max'
+                               describe: 'empty dataset with stack option, without min/max'
                        },
                        {
                                data: {
@@ -940,28 +932,28 @@ describe('Logarithmic Scale tests', function() {
                                type: 'horizontalBar',
                                firstTick: 1,
                                lastTick: 10,
-                               describe: 'empty dataset with stack option, without ticks.min/max'
+                               describe: 'empty dataset with stack option, without min/max'
                        },
                        {
                                dataset: [],
-                               scale: {ticks: {min: 1}},
+                               scale: {min: 1},
                                firstTick: 1,
                                lastTick: 10,
-                               describe: 'empty dataset, ticks.min: 1, without ticks.max'
+                               describe: 'empty dataset, min: 1, without max'
                        },
                        {
                                dataset: [],
-                               scale: {ticks: {max: 80}},
+                               scale: {max: 80},
                                firstTick: 1,
                                lastTick: 80,
-                               describe: 'empty dataset, ticks.max: 80, without ticks.min'
+                               describe: 'empty dataset, max: 80, without min'
                        },
                        {
                                dataset: [],
-                               scale: {ticks: {max: 0.8}},
+                               scale: {max: 0.8},
                                firstTick: 0.01,
                                lastTick: 0.8,
-                               describe: 'empty dataset, ticks.max: 0.8, without ticks.min'
+                               describe: 'empty dataset, max: 0.8, without min'
                        },
                        {
                                dataset: [{x: 10, y: 10}, {x: 5, y: 5}, {x: 1, y: 1}, {x: 25, y: 25}, {x: 78, y: 78}],
@@ -1029,7 +1021,7 @@ describe('Logarithmic Scale tests', function() {
                                                expect(scale.getValueForPixel(start)).toBeCloseTo(firstTick, 4);
                                                expect(scale.getValueForPixel(end)).toBeCloseTo(lastTick, 4);
 
-                                               chart.scales[axisID].options.ticks.reverse = true; // Reverse mode
+                                               chart.scales[axisID].options.reverse = true; // Reverse mode
                                                chart.update();
 
                                                // chartArea might have been resized in update
@@ -1051,24 +1043,24 @@ describe('Logarithmic Scale tests', function() {
                var config = [
                        {
                                dataset: [],
-                               scale: {ticks: {min: 0}},
+                               scale: {min: 0},
                                firstTick: 1, // value of the first tick
                                lastTick: 10, // value of the last tick
-                               describe: 'empty dataset, ticks.min: 0, without ticks.max'
+                               describe: 'empty dataset, min: 0, without max'
                        },
                        {
                                dataset: [],
-                               scale: {ticks: {min: 0, max: 80}},
+                               scale: {min: 0, max: 80},
                                firstTick: 1,
                                lastTick: 80,
-                               describe: 'empty dataset, ticks.min: 0, ticks.max: 80'
+                               describe: 'empty dataset, min: 0, max: 80'
                        },
                        {
                                dataset: [],
-                               scale: {ticks: {min: 0, max: 0.8}},
+                               scale: {min: 0, max: 0.8},
                                firstTick: 0.1,
                                lastTick: 0.8,
-                               describe: 'empty dataset, ticks.min: 0, ticks.max: 0.8'
+                               describe: 'empty dataset, min: 0, max: 0.8'
                        },
                        {
                                dataset: [{x: 0, y: 0}, {x: 10, y: 10}, {x: 1.2, y: 1.2}, {x: 25, y: 25}, {x: 78, y: 78}],
@@ -1084,17 +1076,17 @@ describe('Logarithmic Scale tests', function() {
                        },
                        {
                                dataset: [{x: 10, y: 10}, {x: 1.2, y: 1.2}, {x: 25, y: 25}, {x: 78, y: 78}],
-                               scale: {ticks: {min: 0}},
+                               scale: {min: 0},
                                firstTick: 1,
                                lastTick: 80,
-                               describe: 'dataset min point {x: 1.2, y: 1.2}, max point {x:78, y:78}, ticks.min: 0'
+                               describe: 'dataset min point {x: 1.2, y: 1.2}, max point {x:78, y:78}, min: 0'
                        },
                        {
                                dataset: [{x: 10, y: 10}, {x: 6.3, y: 6.3}, {x: 25, y: 25}, {x: 78, y: 78}],
-                               scale: {ticks: {min: 0}},
+                               scale: {min: 0},
                                firstTick: 6,
                                lastTick: 80,
-                               describe: 'dataset min point {x: 6.3, y: 6.3}, max point {x:78, y:78}, ticks.min: 0'
+                               describe: 'dataset min point {x: 6.3, y: 6.3}, max point {x:78, y:78}, min: 0'
                        },
                ];
                config.forEach(function(setup) {
@@ -1159,7 +1151,7 @@ describe('Logarithmic Scale tests', function() {
                                                expect(scale.getValueForPixel(end)).toBeCloseTo(lastTick, 4);
                                                expect(scale.getValueForPixel(start + sign * fontSize)).toBeCloseTo(firstTick, 4);
 
-                                               chart.scales[axisID].options.ticks.reverse = true; // Reverse mode
+                                               chart.scales[axisID].options.reverse = true; // Reverse mode
                                                chart.update();
 
                                                // chartArea might have been resized in update
index b8ae7c8d825ceb5f3977a9a937334782c1640676..c25dc18d7abc83f383a109bfdd38aaa62fa8d836 100644 (file)
@@ -44,17 +44,17 @@ describe('Test the radial linear scale', function() {
                        },
                        position: 'chartArea',
                        offset: false,
+                       reverse: false,
+                       beginAtZero: false,
                        scaleLabel: Chart.defaults.scale.scaleLabel,
                        ticks: {
                                backdropColor: 'rgba(255,255,255,0.75)',
                                backdropPaddingY: 2,
                                backdropPaddingX: 2,
-                               beginAtZero: false,
                                minRotation: 0,
                                maxRotation: 50,
                                mirror: false,
                                padding: 0,
-                               reverse: false,
                                showLabelBackdrop: true,
                                display: true,
                                callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
@@ -183,10 +183,8 @@ describe('Test the radial linear scale', function() {
                        },
                        options: {
                                scale: {
-                                       ticks: {
-                                               suggestedMin: -10,
-                                               suggestedMax: 10
-                                       }
+                                       suggestedMin: -10,
+                                       suggestedMax: 10
                                }
                        }
                });
@@ -206,10 +204,8 @@ describe('Test the radial linear scale', function() {
                        },
                        options: {
                                scale: {
-                                       ticks: {
-                                               min: -1010,
-                                               max: 1010
-                                       }
+                                       min: -1010,
+                                       max: 1010
                                }
                        }
                });
@@ -230,16 +226,14 @@ describe('Test the radial linear scale', function() {
                        },
                        options: {
                                scale: {
-                                       ticks: {
-                                               beginAtZero: false
-                                       }
+                                       beginAtZero: false
                                }
                        }
                });
 
                expect(getLabels(chart.scale)).toEqual(['20', '25', '30', '35', '40', '45', '50']);
 
-               chart.scale.options.ticks.beginAtZero = true;
+               chart.scale.options.beginAtZero = true;
                chart.update();
 
                expect(getLabels(chart.scale)).toEqual(['0', '5', '10', '15', '20', '25', '30', '35', '40', '45', '50']);
@@ -249,7 +243,7 @@ describe('Test the radial linear scale', function() {
 
                expect(getLabels(chart.scale)).toEqual(['-50', '-45', '-40', '-35', '-30', '-25', '-20', '-15', '-10', '-5', '0']);
 
-               chart.scale.options.ticks.beginAtZero = false;
+               chart.scale.options.beginAtZero = false;
                chart.update();
 
                expect(getLabels(chart.scale)).toEqual(['-50', '-45', '-40', '-35', '-30', '-25', '-20']);
@@ -266,9 +260,7 @@ describe('Test the radial linear scale', function() {
                        },
                        options: {
                                scale: {
-                                       ticks: {
-                                               reverse: true
-                                       }
+                                       reverse: true
                                }
                        }
                });
@@ -308,8 +300,8 @@ describe('Test the radial linear scale', function() {
 
                expect(getLabels(chart.scale)).toEqual(['0.5', '1.0', '1.5', '2.0', '2.5']);
 
-               chart.options.scale.ticks.min = 0.3;
-               chart.options.scale.ticks.max = 2.8;
+               chart.options.scale.min = 0.3;
+               chart.options.scale.max = 2.8;
                chart.update();
 
                expect(getLabels(chart.scale)).toEqual(['0.3', '0.5', '1.0', '1.5', '2.0', '2.5', '2.8']);
@@ -450,7 +442,7 @@ describe('Test the radial linear scale', function() {
                expect(position.x).toBeCloseToPixel(270);
                expect(position.y).toBeCloseToPixel(278);
 
-               chart.scale.options.ticks.reverse = true;
+               chart.scale.options.reverse = true;
                chart.update();
 
                expect(chart.scale.getDistanceFromCenterForValue(chart.scale.min)).toBe(227);
index f314af77afc734b0a7567a3450ac05555f8b642f..40f397b024d85440a7c96a2e9dbf8b808b8824cd 100755 (executable)
@@ -74,18 +74,18 @@ describe('Time scale tests', function() {
                        },
                        position: 'bottom',
                        offset: false,
+                       reverse: false,
+                       beginAtZero: false,
                        scaleLabel: Chart.defaults.scale.scaleLabel,
                        bounds: 'data',
                        distribution: 'linear',
                        adapters: {},
                        ticks: {
-                               beginAtZero: false,
                                minRotation: 0,
                                maxRotation: 50,
                                mirror: false,
                                source: 'auto',
                                padding: 0,
-                               reverse: false,
                                display: true,
                                callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below,
                                autoSkip: false,
@@ -419,28 +419,28 @@ describe('Time scale tests', function() {
                });
 
                it('should use the min option when less than first label for building ticks', function() {
-                       config.ticks.min = '2014-12-29T04:00:00';
+                       config.min = '2014-12-29T04:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[0]).toEqual('Jan 1');
                });
 
                it('should use the min option when greater than first label for building ticks', function() {
-                       config.ticks.min = '2015-01-02T04:00:00';
+                       config.min = '2015-01-02T04:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[0]).toEqual('Jan 2');
                });
 
                it('should use the max option when greater than last label for building ticks', function() {
-                       config.ticks.max = '2015-01-05T06:00:00';
+                       config.max = '2015-01-05T06:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[labels.length - 1]).toEqual('Jan 3');
                });
 
                it('should use the max option when less than last label for building ticks', function() {
-                       config.ticks.max = '2015-01-02T23:00:00';
+                       config.max = '2015-01-02T23:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[labels.length - 1]).toEqual('Jan 2');
@@ -460,28 +460,28 @@ describe('Time scale tests', function() {
                });
 
                it('should use the min option when less than first label for building ticks', function() {
-                       config.ticks.min = '2014-12-29T04:00:00';
+                       config.min = '2014-12-29T04:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[0]).toEqual('Jan 1');
                });
 
                it('should use the min option when greater than first label for building ticks', function() {
-                       config.ticks.min = '2015-01-02T04:00:00';
+                       config.min = '2015-01-02T04:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[0]).toEqual('Jan 2');
                });
 
                it('should use the max option when greater than last label for building ticks', function() {
-                       config.ticks.max = '2015-01-05T06:00:00';
+                       config.max = '2015-01-05T06:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[labels.length - 1]).toEqual('Jan 3');
                });
 
                it('should use the max option when less than last label for building ticks', function() {
-                       config.ticks.max = '2015-01-02T23:00:00';
+                       config.max = '2015-01-02T23:00:00';
 
                        var labels = getLabels(createScale(mockData, config));
                        expect(labels[labels.length - 1]).toEqual('Jan 2');
@@ -958,8 +958,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
-                               options.ticks.max = '2051';
+                               options.min = '2012';
+                               options.max = '2051';
                                chart.update();
 
                                expect(scale.min).toEqual(+moment('2012', 'YYYY'));
@@ -972,8 +972,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2017';
-                               options.ticks.max = '2042';
+                               options.min = '2017';
+                               options.max = '2042';
                                chart.update();
 
                                expect(scale.min).toEqual(+moment('2017', 'YYYY'));
@@ -1052,8 +1052,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
-                               options.ticks.max = '2051';
+                               options.min = '2012';
+                               options.max = '2051';
                                chart.update();
 
                                expect(scale.min).toEqual(+moment('2012', 'YYYY'));
@@ -1066,8 +1066,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2017';
-                               options.ticks.max = '2043';
+                               options.min = '2017';
+                               options.max = '2043';
                                chart.update();
 
                                expect(scale.min).toEqual(+moment('2017', 'YYYY'));
@@ -1151,7 +1151,7 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
+                               options.min = '2012';
                                chart.update();
 
                                var start = scale.left;
@@ -1165,7 +1165,7 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.max = '2050';
+                               options.max = '2050';
                                chart.update();
 
                                var start = scale.left;
@@ -1179,8 +1179,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
-                               options.ticks.max = '2050';
+                               options.min = '2012';
+                               options.max = '2050';
                                chart.update();
 
                                var start = scale.left;
@@ -1235,8 +1235,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
-                               options.ticks.max = '2050';
+                               options.min = '2012';
+                               options.max = '2050';
                                chart.update();
 
                                var start = scale.left;
@@ -1328,7 +1328,7 @@ describe('Time scale tests', function() {
                });
        });
 
-       describe('when ticks.min and/or ticks.max are defined', function() {
+       describe('when min and/or max are defined', function() {
                ['auto', 'data', 'labels'].forEach(function(source) {
                        ['data', 'ticks'].forEach(function(bounds) {
                                describe('and ticks.source is "' + source + '" and bounds "' + bounds + '"', function() {
@@ -1368,8 +1368,8 @@ describe('Time scale tests', function() {
                                                var min = '02/19 07:00';
                                                var max = '02/24 08:00';
 
-                                               options.ticks.min = min;
-                                               options.ticks.max = max;
+                                               options.min = min;
+                                               options.max = max;
                                                chart.update();
 
                                                expect(scale.min).toEqual(+moment(min, 'MM/DD HH:mm'));
@@ -1388,8 +1388,8 @@ describe('Time scale tests', function() {
                                                var min = '02/21 07:00';
                                                var max = '02/22 20:00';
 
-                                               options.ticks.min = min;
-                                               options.ticks.max = max;
+                                               options.min = min;
+                                               options.max = max;
                                                chart.update();
 
                                                expect(scale.min).toEqual(+moment(min, 'MM/DD HH:mm'));
@@ -1462,8 +1462,8 @@ describe('Time scale tests', function() {
                                        var scale = chart.scales.x;
                                        var options = chart.options.scales.xAxes[0];
 
-                                       options.ticks.min = '2012';
-                                       options.ticks.max = '2051';
+                                       options.min = '2012';
+                                       options.max = '2051';
                                        chart.update();
 
                                        expect(scale.getPixelForValue('2012')).toBeCloseToPixel(scale.left);
@@ -1506,8 +1506,8 @@ describe('Time scale tests', function() {
                                        var scale = chart.scales.x;
                                        var options = chart.options.scales.xAxes[0];
 
-                                       options.ticks.min = '2012';
-                                       options.ticks.max = '2051';
+                                       options.min = '2012';
+                                       options.max = '2051';
                                        options.offset = true;
                                        chart.update();
 
@@ -1521,7 +1521,7 @@ describe('Time scale tests', function() {
                });
        });
 
-       describe('when ticks.reverse', function() {
+       describe('when reverse', function() {
                describe('is "true"', function() {
                        beforeEach(function() {
                                this.chart = window.acquireChart({
@@ -1535,12 +1535,12 @@ describe('Time scale tests', function() {
                                                        xAxes: [{
                                                                id: 'x',
                                                                type: 'time',
+                                                               reverse: true,
                                                                time: {
                                                                        parser: 'YYYY',
                                                                },
                                                                ticks: {
                                                                        source: 'labels',
-                                                                       reverse: true
                                                                }
                                                        }],
                                                        yAxes: [{
@@ -1609,7 +1609,7 @@ describe('Time scale tests', function() {
                });
        });
 
-       describe('when ticks.reverse is "true" and distribution', function() {
+       describe('when reverse is "true" and distribution', function() {
                describe('is "series"', function() {
                        beforeEach(function() {
                                this.chart = window.acquireChart({
@@ -1627,9 +1627,9 @@ describe('Time scale tests', function() {
                                                                        parser: 'YYYY'
                                                                },
                                                                distribution: 'series',
+                                                               reverse: true,
                                                                ticks: {
-                                                                       source: 'labels',
-                                                                       reverse: true
+                                                                       source: 'labels'
                                                                }
                                                        }],
                                                        yAxes: [{
@@ -1657,7 +1657,7 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
+                               options.min = '2012';
                                chart.update();
 
                                var start = scale.left;
@@ -1672,7 +1672,7 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.max = '2050';
+                               options.max = '2050';
                                chart.update();
 
                                var start = scale.left;
@@ -1687,8 +1687,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
-                               options.ticks.max = '2050';
+                               options.min = '2012';
+                               options.max = '2050';
                                chart.update();
 
                                var start = scale.left;
@@ -1715,9 +1715,9 @@ describe('Time scale tests', function() {
                                                                        parser: 'YYYY'
                                                                },
                                                                distribution: 'linear',
+                                                               reverse: true,
                                                                ticks: {
-                                                                       source: 'labels',
-                                                                       reverse: true
+                                                                       source: 'labels'
                                                                }
                                                        }],
                                                        yAxes: [{
@@ -1745,8 +1745,8 @@ describe('Time scale tests', function() {
                                var scale = chart.scales.x;
                                var options = chart.options.scales.xAxes[0];
 
-                               options.ticks.min = '2012';
-                               options.ticks.max = '2050';
+                               options.min = '2012';
+                               options.max = '2050';
                                chart.update();
 
                                var start = scale.left;