From: Jukka Kurkela Date: Sat, 6 Feb 2021 21:19:21 +0000 (+0200) Subject: Remove options.scale, in favor of options.scales.r (#8393) X-Git-Tag: v3.0.0-beta.11~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffe4ab14dce3256102e0935358099ec52e949d7a;p=thirdparty%2FChart.js.git Remove options.scale, in favor of options.scales.r (#8393) Remove options.scale, in favor of options.scales.r --- diff --git a/docs/docs/axes/radial/linear.mdx b/docs/docs/axes/radial/linear.mdx index 10cf1757b..fe3e99210 100644 --- a/docs/docs/axes/radial/linear.mdx +++ b/docs/docs/axes/radial/linear.mdx @@ -65,9 +65,11 @@ let chart = new Chart(ctx, { labels: ['January', 'February', 'March', 'April'] }, options: { - scale: { - suggestedMin: 50, - suggestedMax: 100 + scales: { + r: { + suggestedMin: 50, + suggestedMax: 100 + } } } }); @@ -83,11 +85,13 @@ 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: { - stepSize: 0.5 + scales: { + r: { + max: 5, + min: 0, + ticks: { + stepSize: 0.5 + } } } }; diff --git a/docs/docs/charts/radar.mdx b/docs/docs/charts/radar.mdx index 0c2a377e0..06fe80fd3 100644 --- a/docs/docs/charts/radar.mdx +++ b/docs/docs/charts/radar.mdx @@ -178,12 +178,14 @@ The options for this scale are defined in the `scale` property, which can be ref ```javascript options = { - scale: { - angleLines: { - display: false - }, - suggestedMin: 50, - suggestedMax: 100 + scales: { + r: { + angleLines: { + display: false + }, + suggestedMin: 50, + suggestedMax: 100 + } } }; ``` diff --git a/docs/docs/getting-started/v3-migration.md b/docs/docs/getting-started/v3-migration.md index bce18903c..6b86132ec 100644 --- a/docs/docs/getting-started/v3-migration.md +++ b/docs/docs/getting-started/v3-migration.md @@ -73,6 +73,7 @@ A number of changes were made to the configuration options passed to the `Chart` * Polar area `startAngle` option is now consistent with `Radar`, 0 is at top and value is in degrees. Default is changed from `-½π` to `0`. * Doughnut `rotation` option is now in degrees and 0 is at top. Default is changed from `-½π` to `0`. * Doughnut `circumference` option is now in degrees. Default is changed from `2π` to `360`. +* `scale` option was removed in favor of `options.scales.r` (or any other scale id, with `axis: 'r'`) * `scales.[x/y]Axes` arrays were removed. Scales are now configured directly to `options.scales` object with the object key being the scale Id. * `scales.[x/y]Axes.barPercentage` was moved to dataset option `barPercentage` * `scales.[x/y]Axes.barThickness` was moved to dataset option `barThickness` diff --git a/samples/charts/polar-area.html b/samples/charts/polar-area.html index 38b43a071..b5d70660d 100644 --- a/samples/charts/polar-area.html +++ b/samples/charts/polar-area.html @@ -67,11 +67,13 @@ text: 'Chart.js Polar Area Chart' }, }, - scale: { - ticks: { - beginAtZero: true - }, - reverse: false + scales: { + r: { + ticks: { + beginAtZero: true + }, + reverse: false + } }, animation: { animateRotate: false, diff --git a/samples/charts/radar-skip-points.html b/samples/charts/radar-skip-points.html index 45fa896d8..320c38011 100644 --- a/samples/charts/radar-skip-points.html +++ b/samples/charts/radar-skip-points.html @@ -85,8 +85,10 @@ tension: 0.0, } }, - scale: { - beginAtZero: true, + scales: { + r: { + beginAtZero: true, + }, } } }; diff --git a/samples/charts/radar.html b/samples/charts/radar.html index 9f225bee9..f24338a7f 100644 --- a/samples/charts/radar.html +++ b/samples/charts/radar.html @@ -73,8 +73,10 @@ text: 'Chart.js Radar Chart' }, }, - scale: { - beginAtZero: true + scales: { + r: { + beginAtZero: true + } } } }; diff --git a/src/core/core.config.js b/src/core/core.config.js index ce32047e0..6772182ff 100644 --- a/src/core/core.config.js +++ b/src/core/core.config.js @@ -56,12 +56,6 @@ function mergeScaleConfig(config, options) { scales[id] = mergeIf(Object.create(null), [{axis}, scaleConf, defaultScaleOptions[axis], defaultScaleOptions[defaultId]]); }); - // Backward compatibility - if (options.scale) { - scales[options.scale.id || 'r'] = mergeIf(Object.create(null), [{axis: 'r'}, options.scale, chartDefaults.scales.r]); - firstIDs.r = firstIDs.r || options.scale.id || 'r'; - } - // Then merge dataset defaults to scale configs config.data.datasets.forEach(dataset => { const type = dataset.type || config.type; diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 9fae07125..8d257f9c3 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -305,13 +305,6 @@ class Chart { } scale.init(scaleOptions, options); - - // 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 - // make the logic easier and remove some useless? custom code. - if (item.isDefault) { - me.scale = scale; - } }); // clear up discarded scales each(updated, (hasUpdated, id) => { diff --git a/test/fixtures/controller.polarArea/angle-array.json b/test/fixtures/controller.polarArea/angle-array.json index 151b04b33..a1f835a38 100644 --- a/test/fixtures/controller.polarArea/angle-array.json +++ b/test/fixtures/controller.polarArea/angle-array.json @@ -1,32 +1,34 @@ { - "config": { - "type": "polarArea", - "data": { - "labels": ["A", "B", "C", "D", "E"], - "datasets": [{ - "data": [11, 16, 21, 7, 10], - "backgroundColor": [ - "rgba(255, 99, 132, 0.8)", - "rgba(54, 162, 235, 0.8)", - "rgba(255, 206, 86, 0.8)", - "rgba(75, 192, 192, 0.8)", - "rgba(153, 102, 255, 0.8)", - "rgba(255, 159, 64, 0.8)" - ] - }] - }, - "options": { - "elements": { - "arc": { - "angle": [ - 60.5387, 100.6457, 60.5387, 123.5641, 14.7021 - ] - } - }, - "responsive": false, - "scale": { - "display": false - } + "config": { + "type": "polarArea", + "data": { + "labels": ["A", "B", "C", "D", "E"], + "datasets": [ + { + "data": [11, 16, 21, 7, 10], + "backgroundColor": [ + "rgba(255, 99, 132, 0.8)", + "rgba(54, 162, 235, 0.8)", + "rgba(255, 206, 86, 0.8)", + "rgba(75, 192, 192, 0.8)", + "rgba(153, 102, 255, 0.8)", + "rgba(255, 159, 64, 0.8)" + ] } + ] + }, + "options": { + "elements": { + "arc": { + "angle": [60.5387, 100.6457, 60.5387, 123.5641, 14.7021] + } + }, + "responsive": false, + "scales": { + "r": { + "display": false + } + } } + } } diff --git a/test/fixtures/controller.polarArea/angle-lines.json b/test/fixtures/controller.polarArea/angle-lines.json index b7c05d549..55d8a42a2 100644 --- a/test/fixtures/controller.polarArea/angle-lines.json +++ b/test/fixtures/controller.polarArea/angle-lines.json @@ -1,33 +1,37 @@ { - "threshold": 0.05, - "config": { - "type": "polarArea", - "data": { - "labels": ["A", "B", "C", "D", "E"], - "datasets": [{ - "data": [11, 16, 21, 7, 10], - "backgroundColor": [ - "rgba(255, 99, 132, 0.8)", - "rgba(54, 162, 235, 0.8)", - "rgba(255, 206, 86, 0.8)", - "rgba(75, 192, 192, 0.8)", - "rgba(153, 102, 255, 0.8)", - "rgba(255, 159, 64, 0.8)" - ] - }] - }, - "options": { - "responsive": false, - "scale": { - "display": true, - "angleLines": { - "display": true, - "color": "#000" - }, - "ticks": { - "display": false - } - } + "threshold": 0.05, + "config": { + "type": "polarArea", + "data": { + "labels": ["A", "B", "C", "D", "E"], + "datasets": [ + { + "data": [11, 16, 21, 7, 10], + "backgroundColor": [ + "rgba(255, 99, 132, 0.8)", + "rgba(54, 162, 235, 0.8)", + "rgba(255, 206, 86, 0.8)", + "rgba(75, 192, 192, 0.8)", + "rgba(153, 102, 255, 0.8)", + "rgba(255, 159, 64, 0.8)" + ] } + ] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "display": true, + "angleLines": { + "display": true, + "color": "#000" + }, + "ticks": { + "display": false + } + } + } } + } } diff --git a/test/fixtures/controller.polarArea/angle-undefined.json b/test/fixtures/controller.polarArea/angle-undefined.json index e1758b4b7..b2fc1a736 100644 --- a/test/fixtures/controller.polarArea/angle-undefined.json +++ b/test/fixtures/controller.polarArea/angle-undefined.json @@ -1,25 +1,29 @@ { - "config": { - "type": "polarArea", - "data": { - "labels": ["A", "B", "C", "D", "E"], - "datasets": [{ - "data": [11, 16, 21, 7, 10], - "backgroundColor": [ - "rgba(255, 99, 132, 0.8)", - "rgba(54, 162, 235, 0.8)", - "rgba(255, 206, 86, 0.8)", - "rgba(75, 192, 192, 0.8)", - "rgba(153, 102, 255, 0.8)", - "rgba(255, 159, 64, 0.8)" - ] - }] - }, - "options": { - "responsive": false, - "scale": { - "display": false - } + "config": { + "type": "polarArea", + "data": { + "labels": ["A", "B", "C", "D", "E"], + "datasets": [ + { + "data": [11, 16, 21, 7, 10], + "backgroundColor": [ + "rgba(255, 99, 132, 0.8)", + "rgba(54, 162, 235, 0.8)", + "rgba(255, 206, 86, 0.8)", + "rgba(75, 192, 192, 0.8)", + "rgba(153, 102, 255, 0.8)", + "rgba(255, 159, 64, 0.8)" + ] } + ] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "display": false + } + } } + } } diff --git a/test/fixtures/controller.polarArea/backgroundColor/indexable-dataset.js b/test/fixtures/controller.polarArea/backgroundColor/indexable-dataset.js index 60e635cdd..ab4f654fe 100644 --- a/test/fixtures/controller.polarArea/backgroundColor/indexable-dataset.js +++ b/test/fixtures/controller.polarArea/backgroundColor/indexable-dataset.js @@ -19,8 +19,10 @@ module.exports = { ] }, options: { - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/backgroundColor/indexable-element-options.js b/test/fixtures/controller.polarArea/backgroundColor/indexable-element-options.js index 371f2b606..813d18274 100644 --- a/test/fixtures/controller.polarArea/backgroundColor/indexable-element-options.js +++ b/test/fixtures/controller.polarArea/backgroundColor/indexable-element-options.js @@ -23,8 +23,10 @@ module.exports = { ] } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/backgroundColor/scriptable-dataset.js b/test/fixtures/controller.polarArea/backgroundColor/scriptable-dataset.js index 22f2b0e80..e3754faf4 100644 --- a/test/fixtures/controller.polarArea/backgroundColor/scriptable-dataset.js +++ b/test/fixtures/controller.polarArea/backgroundColor/scriptable-dataset.js @@ -18,8 +18,10 @@ module.exports = { ] }, options: { - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/backgroundColor/scriptable-element-options.js b/test/fixtures/controller.polarArea/backgroundColor/scriptable-element-options.js index 97fb91317..dd9651c4c 100644 --- a/test/fixtures/controller.polarArea/backgroundColor/scriptable-element-options.js +++ b/test/fixtures/controller.polarArea/backgroundColor/scriptable-element-options.js @@ -22,8 +22,10 @@ module.exports = { } } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/backgroundColor/value-dataset.js b/test/fixtures/controller.polarArea/backgroundColor/value-dataset.js index 7a17ee754..5fe96ce47 100644 --- a/test/fixtures/controller.polarArea/backgroundColor/value-dataset.js +++ b/test/fixtures/controller.polarArea/backgroundColor/value-dataset.js @@ -12,8 +12,10 @@ module.exports = { ] }, options: { - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/backgroundColor/value-element-options.js b/test/fixtures/controller.polarArea/backgroundColor/value-element-options.js index 8c0dc9423..1b6fef8e6 100644 --- a/test/fixtures/controller.polarArea/backgroundColor/value-element-options.js +++ b/test/fixtures/controller.polarArea/backgroundColor/value-element-options.js @@ -16,8 +16,10 @@ module.exports = { backgroundColor: '#00ff00' } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/border-align-center.json b/test/fixtures/controller.polarArea/border-align-center.json index 683cc9fb0..c3ecf87ee 100644 --- a/test/fixtures/controller.polarArea/border-align-center.json +++ b/test/fixtures/controller.polarArea/border-align-center.json @@ -1,39 +1,41 @@ { - "config": { - "type": "polarArea", - "data": { - "labels": ["A", "B", "C", "D", "E"], - "datasets": [{ - "data": [11, 16, 21, 1, 10], - "backgroundColor": [ - "rgba(255, 99, 132, 0.8)", - "rgba(54, 162, 235, 0.8)", - "rgba(255, 206, 86, 0.8)", - "rgba(75, 192, 192, 0.8)", - "rgba(153, 102, 255, 0.8)" - ], - "borderWidth": 20, - "borderColor": [ - "rgb(255, 99, 132)", - "rgb(54, 162, 235)", - "rgb(255, 206, 86)", - "rgb(75, 192, 192)", - "rgb(153, 102, 255)" - ] - }] - }, - "options": { - "elements": { - "arc": { - "angle": [ - 2.1658, 10.8404, 21.6922, 108.4323, 216.8588 - ] - } - }, - "responsive": false, - "scale": { - "display": false - } + "config": { + "type": "polarArea", + "data": { + "labels": ["A", "B", "C", "D", "E"], + "datasets": [ + { + "data": [11, 16, 21, 1, 10], + "backgroundColor": [ + "rgba(255, 99, 132, 0.8)", + "rgba(54, 162, 235, 0.8)", + "rgba(255, 206, 86, 0.8)", + "rgba(75, 192, 192, 0.8)", + "rgba(153, 102, 255, 0.8)" + ], + "borderWidth": 20, + "borderColor": [ + "rgb(255, 99, 132)", + "rgb(54, 162, 235)", + "rgb(255, 206, 86)", + "rgb(75, 192, 192)", + "rgb(153, 102, 255)" + ] } + ] + }, + "options": { + "elements": { + "arc": { + "angle": [2.1658, 10.8404, 21.6922, 108.4323, 216.8588] + } + }, + "responsive": false, + "scales": { + "r": { + "display": false + } + } } + } } diff --git a/test/fixtures/controller.polarArea/border-align-inner.json b/test/fixtures/controller.polarArea/border-align-inner.json index 6ed5753aa..d709b0f8b 100644 --- a/test/fixtures/controller.polarArea/border-align-inner.json +++ b/test/fixtures/controller.polarArea/border-align-inner.json @@ -1,40 +1,42 @@ { - "config": { - "type": "polarArea", - "data": { - "labels": ["A", "B", "C", "D", "E"], - "datasets": [{ - "data": [11, 16, 21, 1, 10], - "backgroundColor": [ - "rgba(255, 99, 132, 0.8)", - "rgba(54, 162, 235, 0.8)", - "rgba(255, 206, 86, 0.8)", - "rgba(75, 192, 192, 0.8)", - "rgba(153, 102, 255, 0.8)" - ], - "borderWidth": 20, - "borderColor": [ - "rgb(255, 99, 132)", - "rgb(54, 162, 235)", - "rgb(255, 206, 86)", - "rgb(75, 192, 192)", - "rgb(153, 102, 255)" - ], - "borderAlign": "inner" - }] - }, - "options": { - "elements": { - "arc": { - "angle": [ - 2.1658, 10.8404, 21.6922, 108.4323, 216.8588 - ] - } - }, - "responsive": false, - "scale": { - "display": false - } + "config": { + "type": "polarArea", + "data": { + "labels": ["A", "B", "C", "D", "E"], + "datasets": [ + { + "data": [11, 16, 21, 1, 10], + "backgroundColor": [ + "rgba(255, 99, 132, 0.8)", + "rgba(54, 162, 235, 0.8)", + "rgba(255, 206, 86, 0.8)", + "rgba(75, 192, 192, 0.8)", + "rgba(153, 102, 255, 0.8)" + ], + "borderWidth": 20, + "borderColor": [ + "rgb(255, 99, 132)", + "rgb(54, 162, 235)", + "rgb(255, 206, 86)", + "rgb(75, 192, 192)", + "rgb(153, 102, 255)" + ], + "borderAlign": "inner" } + ] + }, + "options": { + "elements": { + "arc": { + "angle": [2.1658, 10.8404, 21.6922, 108.4323, 216.8588] + } + }, + "responsive": false, + "scales": { + "r": { + "display": false + } + } } + } } diff --git a/test/fixtures/controller.polarArea/borderAlign/indexable-dataset.js b/test/fixtures/controller.polarArea/borderAlign/indexable-dataset.js index 67a8005ea..5f121da5b 100644 --- a/test/fixtures/controller.polarArea/borderAlign/indexable-dataset.js +++ b/test/fixtures/controller.polarArea/borderAlign/indexable-dataset.js @@ -27,8 +27,10 @@ module.exports = { borderWidth: 5, } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderAlign/indexable-element-options.js b/test/fixtures/controller.polarArea/borderAlign/indexable-element-options.js index 77f417d23..8a3cc5c94 100644 --- a/test/fixtures/controller.polarArea/borderAlign/indexable-element-options.js +++ b/test/fixtures/controller.polarArea/borderAlign/indexable-element-options.js @@ -26,8 +26,10 @@ module.exports = { ] } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderAlign/scriptable-dataset.js b/test/fixtures/controller.polarArea/borderAlign/scriptable-dataset.js index b84e3eed9..d86b4a924 100644 --- a/test/fixtures/controller.polarArea/borderAlign/scriptable-dataset.js +++ b/test/fixtures/controller.polarArea/borderAlign/scriptable-dataset.js @@ -23,8 +23,10 @@ module.exports = { borderWidth: 8, } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderAlign/scriptable-element-options.js b/test/fixtures/controller.polarArea/borderAlign/scriptable-element-options.js index 0008cd954..1cc9f41ce 100644 --- a/test/fixtures/controller.polarArea/borderAlign/scriptable-element-options.js +++ b/test/fixtures/controller.polarArea/borderAlign/scriptable-element-options.js @@ -22,8 +22,10 @@ module.exports = { } } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderAlign/value-dataset.js b/test/fixtures/controller.polarArea/borderAlign/value-dataset.js index 6c2c5de4b..08c1a27b1 100644 --- a/test/fixtures/controller.polarArea/borderAlign/value-dataset.js +++ b/test/fixtures/controller.polarArea/borderAlign/value-dataset.js @@ -20,8 +20,10 @@ module.exports = { borderWidth: 4, } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderAlign/value-element-options.js b/test/fixtures/controller.polarArea/borderAlign/value-element-options.js index 29beb1027..fff5d37e4 100644 --- a/test/fixtures/controller.polarArea/borderAlign/value-element-options.js +++ b/test/fixtures/controller.polarArea/borderAlign/value-element-options.js @@ -19,8 +19,10 @@ module.exports = { borderWidth: 4, } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderColor/indexable-dataset.js b/test/fixtures/controller.polarArea/borderColor/indexable-dataset.js index 655afa8d0..a9b8a49ee 100644 --- a/test/fixtures/controller.polarArea/borderColor/indexable-dataset.js +++ b/test/fixtures/controller.polarArea/borderColor/indexable-dataset.js @@ -25,8 +25,10 @@ module.exports = { borderWidth: 8 } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderColor/indexable-element-options.js b/test/fixtures/controller.polarArea/borderColor/indexable-element-options.js index 982a72d29..6a02f6b4d 100644 --- a/test/fixtures/controller.polarArea/borderColor/indexable-element-options.js +++ b/test/fixtures/controller.polarArea/borderColor/indexable-element-options.js @@ -25,8 +25,10 @@ module.exports = { borderWidth: 8 } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderColor/scriptable-dataset.js b/test/fixtures/controller.polarArea/borderColor/scriptable-dataset.js index 4af1e488b..e56394346 100644 --- a/test/fixtures/controller.polarArea/borderColor/scriptable-dataset.js +++ b/test/fixtures/controller.polarArea/borderColor/scriptable-dataset.js @@ -24,8 +24,10 @@ module.exports = { borderWidth: 8 } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderColor/scriptable-element-options.js b/test/fixtures/controller.polarArea/borderColor/scriptable-element-options.js index 58f14739c..733b21933 100644 --- a/test/fixtures/controller.polarArea/borderColor/scriptable-element-options.js +++ b/test/fixtures/controller.polarArea/borderColor/scriptable-element-options.js @@ -24,8 +24,10 @@ module.exports = { borderWidth: 8 } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderColor/value-dataset.js b/test/fixtures/controller.polarArea/borderColor/value-dataset.js index d266635e3..925eddf2e 100644 --- a/test/fixtures/controller.polarArea/borderColor/value-dataset.js +++ b/test/fixtures/controller.polarArea/borderColor/value-dataset.js @@ -18,8 +18,10 @@ module.exports = { borderWidth: 8 } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderColor/value-element-options.js b/test/fixtures/controller.polarArea/borderColor/value-element-options.js index 45e8693f4..b75ea2431 100644 --- a/test/fixtures/controller.polarArea/borderColor/value-element-options.js +++ b/test/fixtures/controller.polarArea/borderColor/value-element-options.js @@ -18,8 +18,10 @@ module.exports = { borderWidth: 8 } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderWidth/indexable-dataset.js b/test/fixtures/controller.polarArea/borderWidth/indexable-dataset.js index c03f64c24..901612e1b 100644 --- a/test/fixtures/controller.polarArea/borderWidth/indexable-dataset.js +++ b/test/fixtures/controller.polarArea/borderWidth/indexable-dataset.js @@ -25,8 +25,10 @@ module.exports = { borderColor: '#888', } }, - scale: { - display: false, + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderWidth/indexable-element-options.js b/test/fixtures/controller.polarArea/borderWidth/indexable-element-options.js index 2b7d14412..8b75cc985 100644 --- a/test/fixtures/controller.polarArea/borderWidth/indexable-element-options.js +++ b/test/fixtures/controller.polarArea/borderWidth/indexable-element-options.js @@ -25,8 +25,10 @@ module.exports = { ] } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderWidth/scriptable-dataset.js b/test/fixtures/controller.polarArea/borderWidth/scriptable-dataset.js index 36e91a7fd..bdd4b4e32 100644 --- a/test/fixtures/controller.polarArea/borderWidth/scriptable-dataset.js +++ b/test/fixtures/controller.polarArea/borderWidth/scriptable-dataset.js @@ -21,8 +21,10 @@ module.exports = { borderColor: '#888', } }, - scale: { - display: false, + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderWidth/scriptable-element-options.js b/test/fixtures/controller.polarArea/borderWidth/scriptable-element-options.js index dca17e685..f57915eb8 100644 --- a/test/fixtures/controller.polarArea/borderWidth/scriptable-element-options.js +++ b/test/fixtures/controller.polarArea/borderWidth/scriptable-element-options.js @@ -20,8 +20,10 @@ module.exports = { } } }, - scale: { - display: false + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderWidth/value-dataset.js b/test/fixtures/controller.polarArea/borderWidth/value-dataset.js index 2fc8e1b25..0981b4e2b 100644 --- a/test/fixtures/controller.polarArea/borderWidth/value-dataset.js +++ b/test/fixtures/controller.polarArea/borderWidth/value-dataset.js @@ -18,8 +18,10 @@ module.exports = { borderColor: '#888', } }, - scale: { - display: false, + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.polarArea/borderWidth/value-element-options.js b/test/fixtures/controller.polarArea/borderWidth/value-element-options.js index bdafaca68..42d2a86be 100644 --- a/test/fixtures/controller.polarArea/borderWidth/value-element-options.js +++ b/test/fixtures/controller.polarArea/borderWidth/value-element-options.js @@ -18,8 +18,10 @@ module.exports = { borderWidth: 4 } }, - scale: { - display: false, + scales: { + r: { + display: false + } } } }, diff --git a/test/fixtures/controller.radar/backgroundColor/scriptable.js b/test/fixtures/controller.radar/backgroundColor/scriptable.js index 80953d7b9..54ccb5f1f 100644 --- a/test/fixtures/controller.radar/backgroundColor/scriptable.js +++ b/test/fixtures/controller.radar/backgroundColor/scriptable.js @@ -36,9 +36,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15, + scales: { + r: { + display: false, + min: -15, + }, }, plugins: { legend: false, diff --git a/test/fixtures/controller.radar/backgroundColor/value.js b/test/fixtures/controller.radar/backgroundColor/value.js index 5c090a775..0c6084104 100644 --- a/test/fixtures/controller.radar/backgroundColor/value.js +++ b/test/fixtures/controller.radar/backgroundColor/value.js @@ -25,9 +25,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } }, plugins: { legend: false, diff --git a/test/fixtures/controller.radar/borderCapStyle/scriptable.js b/test/fixtures/controller.radar/borderCapStyle/scriptable.js index bbcf06dae..0bd84298b 100644 --- a/test/fixtures/controller.radar/borderCapStyle/scriptable.js +++ b/test/fixtures/controller.radar/borderCapStyle/scriptable.js @@ -44,9 +44,11 @@ module.exports = { layout: { padding: 32 }, - scale: { - display: false, - beginAtZero: true + scales: { + r: { + display: false, + beginAtZero: true + } } } }, diff --git a/test/fixtures/controller.radar/borderCapStyle/value.js b/test/fixtures/controller.radar/borderCapStyle/value.js index c730dfc86..c5b914f9e 100644 --- a/test/fixtures/controller.radar/borderCapStyle/value.js +++ b/test/fixtures/controller.radar/borderCapStyle/value.js @@ -35,9 +35,11 @@ module.exports = { layout: { padding: 32 }, - scale: { - display: false, - beginAtZero: true + scales: { + r: { + display: false, + beginAtZero: true + } } } }, diff --git a/test/fixtures/controller.radar/borderColor/scriptable.js b/test/fixtures/controller.radar/borderColor/scriptable.js index 89bdf26ee..b301e2e9e 100644 --- a/test/fixtures/controller.radar/borderColor/scriptable.js +++ b/test/fixtures/controller.radar/borderColor/scriptable.js @@ -38,9 +38,11 @@ module.exports = { radius: 16 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/borderColor/value.js b/test/fixtures/controller.radar/borderColor/value.js index 9b9bacfc0..ce40c1d4f 100644 --- a/test/fixtures/controller.radar/borderColor/value.js +++ b/test/fixtures/controller.radar/borderColor/value.js @@ -26,9 +26,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/borderDash/scriptable.js b/test/fixtures/controller.radar/borderDash/scriptable.js index 8a54bfb92..a26873c11 100644 --- a/test/fixtures/controller.radar/borderDash/scriptable.js +++ b/test/fixtures/controller.radar/borderDash/scriptable.js @@ -30,9 +30,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/borderDash/value.js b/test/fixtures/controller.radar/borderDash/value.js index f4a4596df..3d19af898 100644 --- a/test/fixtures/controller.radar/borderDash/value.js +++ b/test/fixtures/controller.radar/borderDash/value.js @@ -27,10 +27,13 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } + } }, options: { diff --git a/test/fixtures/controller.radar/borderDashOffset/scriptable.js b/test/fixtures/controller.radar/borderDashOffset/scriptable.js index 5262483fc..0aecff6d4 100644 --- a/test/fixtures/controller.radar/borderDashOffset/scriptable.js +++ b/test/fixtures/controller.radar/borderDashOffset/scriptable.js @@ -36,10 +36,13 @@ module.exports = { layout: { padding: 32 }, - scale: { - display: false, - min: -1 + scales: { + r: { + display: false, + min: -1 + } } + } }, options: { diff --git a/test/fixtures/controller.radar/borderDashOffset/value.js b/test/fixtures/controller.radar/borderDashOffset/value.js index 6c7ed68f2..18d0bcc47 100644 --- a/test/fixtures/controller.radar/borderDashOffset/value.js +++ b/test/fixtures/controller.radar/borderDashOffset/value.js @@ -32,10 +32,13 @@ module.exports = { layout: { padding: 32 }, - scale: { - display: false, - min: -1 + scales: { + r: { + display: false, + min: -1 + } } + } }, options: { diff --git a/test/fixtures/controller.radar/borderJoinStyle/scriptable.js b/test/fixtures/controller.radar/borderJoinStyle/scriptable.js index 5ff3fdd01..d36a3a050 100644 --- a/test/fixtures/controller.radar/borderJoinStyle/scriptable.js +++ b/test/fixtures/controller.radar/borderJoinStyle/scriptable.js @@ -44,9 +44,11 @@ module.exports = { layout: { padding: 32 }, - scale: { - display: false, - beginAtZero: true + scales: { + r: { + display: false, + beginAtZero: true + } } } }, diff --git a/test/fixtures/controller.radar/borderJoinStyle/value.js b/test/fixtures/controller.radar/borderJoinStyle/value.js index ad6a00033..fc05fb251 100644 --- a/test/fixtures/controller.radar/borderJoinStyle/value.js +++ b/test/fixtures/controller.radar/borderJoinStyle/value.js @@ -35,9 +35,11 @@ module.exports = { layout: { padding: 32 }, - scale: { - display: false, - beginAtZero: true + scales: { + r: { + display: false, + beginAtZero: true + } } } }, diff --git a/test/fixtures/controller.radar/borderWidth/scriptable.js b/test/fixtures/controller.radar/borderWidth/scriptable.js index 99ec83bd4..dc0a8e0cf 100644 --- a/test/fixtures/controller.radar/borderWidth/scriptable.js +++ b/test/fixtures/controller.radar/borderWidth/scriptable.js @@ -36,10 +36,13 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } + } }, options: { diff --git a/test/fixtures/controller.radar/borderWidth/value.js b/test/fixtures/controller.radar/borderWidth/value.js index 3292c0b04..91880c36e 100644 --- a/test/fixtures/controller.radar/borderWidth/value.js +++ b/test/fixtures/controller.radar/borderWidth/value.js @@ -27,10 +27,13 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } + } }, options: { diff --git a/test/fixtures/controller.radar/borderWidth/zero.js b/test/fixtures/controller.radar/borderWidth/zero.js index 1298b0ab1..c7110b9be 100644 --- a/test/fixtures/controller.radar/borderWidth/zero.js +++ b/test/fixtures/controller.radar/borderWidth/zero.js @@ -29,10 +29,13 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } + } }, options: { diff --git a/test/fixtures/controller.radar/fill/scriptable.js b/test/fixtures/controller.radar/fill/scriptable.js index aef77d0da..b8d42b3ad 100644 --- a/test/fixtures/controller.radar/fill/scriptable.js +++ b/test/fixtures/controller.radar/fill/scriptable.js @@ -27,9 +27,11 @@ module.exports = { } } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } }, plugins: { legend: false, diff --git a/test/fixtures/controller.radar/fill/value.js b/test/fixtures/controller.radar/fill/value.js index 6e31a41c2..8f72f59d9 100644 --- a/test/fixtures/controller.radar/fill/value.js +++ b/test/fixtures/controller.radar/fill/value.js @@ -23,9 +23,11 @@ module.exports = { fill: true } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } }, plugins: { legend: false, diff --git a/test/fixtures/controller.radar/point-style.json b/test/fixtures/controller.radar/point-style.json index cf119b046..6375eb67b 100644 --- a/test/fixtures/controller.radar/point-style.json +++ b/test/fixtures/controller.radar/point-style.json @@ -1,91 +1,97 @@ { - "config": { - "type": "radar", - "data": { - "labels": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], - "datasets": [{ - "borderColor": "transparent", - "data": [3, 3, 3, 3, 3, 3, 3, 3, 3, 3], - "pointBackgroundColor": "#00ff00", - "pointBorderColor": "transparent", - "pointBorderWidth": 0, - "pointRadius": 16, - "pointStyle": [ - "circle", - "cross", - "crossRot", - "dash", - "line", - "rect", - "rectRounded", - "rectRot", - "star", - "triangle" - ] - }, { - "borderColor": "transparent", - "data": [2, 2, 2, 2, 2, 2, 2, 2, 2, 2], - "pointBackgroundColor": "transparent", - "pointBorderColor": "#0000ff", - "pointBorderWidth": 1, - "pointRadius": 16, - "pointStyle": [ - "circle", - "cross", - "crossRot", - "dash", - "line", - "rect", - "rectRounded", - "rectRot", - "star", - "triangle" - ] - }, { - "borderColor": "transparent", - "data": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], - "pointBackgroundColor": "#00ff00", - "pointBorderColor": "#0000ff", - "pointBorderWidth": 1, - "pointRadius": 16, - "pointStyle": [ - "circle", - "cross", - "crossRot", - "dash", - "line", - "rect", - "rectRounded", - "rectRot", - "star", - "triangle" - ] - }] + "config": { + "type": "radar", + "data": { + "labels": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + "datasets": [ + { + "borderColor": "transparent", + "data": [3, 3, 3, 3, 3, 3, 3, 3, 3, 3], + "pointBackgroundColor": "#00ff00", + "pointBorderColor": "transparent", + "pointBorderWidth": 0, + "pointRadius": 16, + "pointStyle": [ + "circle", + "cross", + "crossRot", + "dash", + "line", + "rect", + "rectRounded", + "rectRot", + "star", + "triangle" + ] }, - "options": { - "responsive": false, - "scale": { - "display": false, - "min": 0, - "max": 3 - }, - "elements": { - "line": { - "fill": false - } - }, - "layout": { - "padding": { - "left": 24, - "right": 24 - } - } + { + "borderColor": "transparent", + "data": [2, 2, 2, 2, 2, 2, 2, 2, 2, 2], + "pointBackgroundColor": "transparent", + "pointBorderColor": "#0000ff", + "pointBorderWidth": 1, + "pointRadius": 16, + "pointStyle": [ + "circle", + "cross", + "crossRot", + "dash", + "line", + "rect", + "rectRounded", + "rectRot", + "star", + "triangle" + ] + }, + { + "borderColor": "transparent", + "data": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + "pointBackgroundColor": "#00ff00", + "pointBorderColor": "#0000ff", + "pointBorderWidth": 1, + "pointRadius": 16, + "pointStyle": [ + "circle", + "cross", + "crossRot", + "dash", + "line", + "rect", + "rectRounded", + "rectRot", + "star", + "triangle" + ] } + ] }, "options": { - "canvas": { - "height": 512, - "width": 512 + "responsive": false, + "scales": { + "r": { + "display": false, + "min": 0, + "max": 3 + } + }, + "elements": { + "line": { + "fill": false } + }, + "layout": { + "padding": { + "left": 24, + "right": 24 + } + } + } + }, + "options": { + "canvas": { + "height": 512, + "width": 512 } + } } diff --git a/test/fixtures/controller.radar/pointBackgroundColor/indexable.js b/test/fixtures/controller.radar/pointBackgroundColor/indexable.js index 4f1ec3801..2bfb94caf 100644 --- a/test/fixtures/controller.radar/pointBackgroundColor/indexable.js +++ b/test/fixtures/controller.radar/pointBackgroundColor/indexable.js @@ -39,9 +39,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBackgroundColor/scriptable.js b/test/fixtures/controller.radar/pointBackgroundColor/scriptable.js index 41009805d..7adbd97f0 100644 --- a/test/fixtures/controller.radar/pointBackgroundColor/scriptable.js +++ b/test/fixtures/controller.radar/pointBackgroundColor/scriptable.js @@ -37,9 +37,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBackgroundColor/value.js b/test/fixtures/controller.radar/pointBackgroundColor/value.js index 469e5ec1e..66e1d416e 100644 --- a/test/fixtures/controller.radar/pointBackgroundColor/value.js +++ b/test/fixtures/controller.radar/pointBackgroundColor/value.js @@ -25,9 +25,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBorderColor/indexable.js b/test/fixtures/controller.radar/pointBorderColor/indexable.js index 90fa772e4..133515978 100644 --- a/test/fixtures/controller.radar/pointBorderColor/indexable.js +++ b/test/fixtures/controller.radar/pointBorderColor/indexable.js @@ -40,9 +40,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBorderColor/scriptable.js b/test/fixtures/controller.radar/pointBorderColor/scriptable.js index da65f1e19..9e0cf8b89 100644 --- a/test/fixtures/controller.radar/pointBorderColor/scriptable.js +++ b/test/fixtures/controller.radar/pointBorderColor/scriptable.js @@ -38,9 +38,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBorderColor/value.js b/test/fixtures/controller.radar/pointBorderColor/value.js index d46c2b875..ef4fdbebf 100644 --- a/test/fixtures/controller.radar/pointBorderColor/value.js +++ b/test/fixtures/controller.radar/pointBorderColor/value.js @@ -26,9 +26,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBorderWidth/indexable.js b/test/fixtures/controller.radar/pointBorderWidth/indexable.js index 6f4b1e92c..7accea2d0 100644 --- a/test/fixtures/controller.radar/pointBorderWidth/indexable.js +++ b/test/fixtures/controller.radar/pointBorderWidth/indexable.js @@ -31,9 +31,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBorderWidth/scriptable.js b/test/fixtures/controller.radar/pointBorderWidth/scriptable.js index 2c3b65ed5..65bd8480d 100644 --- a/test/fixtures/controller.radar/pointBorderWidth/scriptable.js +++ b/test/fixtures/controller.radar/pointBorderWidth/scriptable.js @@ -37,9 +37,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointBorderWidth/value.js b/test/fixtures/controller.radar/pointBorderWidth/value.js index 9c881bbca..91555695d 100644 --- a/test/fixtures/controller.radar/pointBorderWidth/value.js +++ b/test/fixtures/controller.radar/pointBorderWidth/value.js @@ -27,9 +27,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointStyle/indexable.js b/test/fixtures/controller.radar/pointStyle/indexable.js index 8724a3648..b9cf41dfa 100644 --- a/test/fixtures/controller.radar/pointStyle/indexable.js +++ b/test/fixtures/controller.radar/pointStyle/indexable.js @@ -43,9 +43,11 @@ module.exports = { radius: 10 } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointStyle/scriptable.js b/test/fixtures/controller.radar/pointStyle/scriptable.js index 3f3210b6b..eac8628d0 100644 --- a/test/fixtures/controller.radar/pointStyle/scriptable.js +++ b/test/fixtures/controller.radar/pointStyle/scriptable.js @@ -41,9 +41,11 @@ module.exports = { radius: 10, } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/pointStyle/value.js b/test/fixtures/controller.radar/pointStyle/value.js index 08596a870..719752881 100644 --- a/test/fixtures/controller.radar/pointStyle/value.js +++ b/test/fixtures/controller.radar/pointStyle/value.js @@ -27,9 +27,11 @@ module.exports = { radius: 10, } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/radius/indexable.js b/test/fixtures/controller.radar/radius/indexable.js index 7b836149a..9eb23f091 100644 --- a/test/fixtures/controller.radar/radius/indexable.js +++ b/test/fixtures/controller.radar/radius/indexable.js @@ -30,9 +30,11 @@ module.exports = { ], } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/radius/scriptable.js b/test/fixtures/controller.radar/radius/scriptable.js index dcac83526..d5fc1a814 100644 --- a/test/fixtures/controller.radar/radius/scriptable.js +++ b/test/fixtures/controller.radar/radius/scriptable.js @@ -36,9 +36,11 @@ module.exports = { }, } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/radius/value.js b/test/fixtures/controller.radar/radius/value.js index bf32433e8..d7bc6b8e0 100644 --- a/test/fixtures/controller.radar/radius/value.js +++ b/test/fixtures/controller.radar/radius/value.js @@ -26,9 +26,11 @@ module.exports = { radius: 3, } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/rotation/indexable.js b/test/fixtures/controller.radar/rotation/indexable.js index 6ab5d83ee..8f22a396b 100644 --- a/test/fixtures/controller.radar/rotation/indexable.js +++ b/test/fixtures/controller.radar/rotation/indexable.js @@ -32,9 +32,11 @@ module.exports = { ], } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/rotation/scriptable.js b/test/fixtures/controller.radar/rotation/scriptable.js index 134673be1..890e02c2a 100644 --- a/test/fixtures/controller.radar/rotation/scriptable.js +++ b/test/fixtures/controller.radar/rotation/scriptable.js @@ -38,9 +38,11 @@ module.exports = { radius: 10, } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/rotation/value.js b/test/fixtures/controller.radar/rotation/value.js index c9a46ad43..5a1959d66 100644 --- a/test/fixtures/controller.radar/rotation/value.js +++ b/test/fixtures/controller.radar/rotation/value.js @@ -28,9 +28,11 @@ module.exports = { rotation: 0, } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } } } }, diff --git a/test/fixtures/controller.radar/showLine/value.js b/test/fixtures/controller.radar/showLine/value.js index 3973195f0..c933450dd 100644 --- a/test/fixtures/controller.radar/showLine/value.js +++ b/test/fixtures/controller.radar/showLine/value.js @@ -31,9 +31,11 @@ module.exports = { fill: true } }, - scale: { - display: false, - min: -15 + scales: { + r: { + display: false, + min: -15 + } }, plugins: { legend: false, diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-end-circular.json b/test/fixtures/plugin.filler/fill-radar-boundary-end-circular.json index 65e6db8a9..cee537e64 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-end-circular.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-end-circular.json @@ -1,51 +1,58 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [5.5, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [8, 7, 6.5, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false, - "gridLines": { - "circular": true - } - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "end" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [5.5, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [8, 7, 6.5, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false, + "gridLines": { + "circular": true + } } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "end" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-end-span.json b/test/fixtures/plugin.filler/fill-radar-boundary-end-span.json index 5196559e9..531a28a3c 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-end-span.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-end-span.json @@ -1,48 +1,55 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [5.5, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [8, 7, 6.5, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": true, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "end" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [5.5, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [8, 7, 6.5, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": true, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "end" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-end.json b/test/fixtures/plugin.filler/fill-radar-boundary-end.json index 94b755041..5ea718055 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-end.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-end.json @@ -1,48 +1,55 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [5.5, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [8, 7, 6.5, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "end" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [5.5, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [8, 7, 6.5, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "end" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-origin-circular.json b/test/fixtures/plugin.filler/fill-radar-boundary-origin-circular.json index 51538c87a..d479c28a9 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-origin-circular.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-origin-circular.json @@ -1,51 +1,58 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 4, 2, 1, -1, 1, 2] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [4, 2, null, 3, 2.5, null, -2, 1.5, 3] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [3.5, 2, 1, 2.5, -2, 3, -1, null, null] - }, { - "backgroundColor": "rgba(128, 0, 128, 0.25)", - "data": [5, 6, 5, -2, -4, -3, 4, 2, 4.5] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 4, 2, 1, -1, 1, 2] }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false, - "gridLines": { - "circular": true - } - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "origin" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [4, 2, null, 3, 2.5, null, -2, 1.5, 3] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [3.5, 2, 1, 2.5, -2, 3, -1, null, null] + }, + { + "backgroundColor": "rgba(128, 0, 128, 0.25)", + "data": [5, 6, 5, -2, -4, -3, 4, 2, 4.5] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false, + "gridLines": { + "circular": true + } } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "origin" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-origin-span.json b/test/fixtures/plugin.filler/fill-radar-boundary-origin-span.json index 17514471f..55e3cb2eb 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-origin-span.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-origin-span.json @@ -1,48 +1,55 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [6, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 64, 192, 0.25)", - "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": true, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "origin" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [6, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 64, 192, 0.25)", + "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": true, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "origin" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline-span.json b/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline-span.json index 138a3a0fc..25d6c4685 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline-span.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline-span.json @@ -1,49 +1,56 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 4, 2, 1, -1, 1, 2] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [4, 2, null, 3, 2.5, null, -2, 1.5, 3] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [3.5, 2, 1, 2.5, -2, 3, -1, null, null] - }, { - "backgroundColor": "rgba(128, 0, 128, 0.25)", - "data": [5, 6, 5, -2, -4, -3, 4, 2, 4.5] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 4, 2, 1, -1, 1, 2] }, - "options": { - "responsive": false, - "spanGaps": true, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "tension": 0.5, - "fill": "origin" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [4, 2, null, 3, 2.5, null, -2, 1.5, 3] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [3.5, 2, 1, 2.5, -2, 3, -1, null, null] + }, + { + "backgroundColor": "rgba(128, 0, 128, 0.25)", + "data": [5, 6, 5, -2, -4, -3, 4, 2, 4.5] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": true, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "tension": 0.5, + "fill": "origin" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline.json b/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline.json index 7689972c7..957666f55 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-origin-spline.json @@ -1,49 +1,56 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 4, 2, 1, -1, 1, 2] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [4, 2, null, 3, 2.5, null, -2, 1.5, 3] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [3.5, 2, 1, 2.5, -2, 3, -1, null, null] - }, { - "backgroundColor": "rgba(128, 0, 128, 0.25)", - "data": [5, 6, 5, -2, -4, -3, 4, 2, 4.5] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 4, 2, 1, -1, 1, 2] }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "tension": 0.5, - "fill": "origin" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [4, 2, null, 3, 2.5, null, -2, 1.5, 3] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [3.5, 2, 1, 2.5, -2, 3, -1, null, null] + }, + { + "backgroundColor": "rgba(128, 0, 128, 0.25)", + "data": [5, 6, 5, -2, -4, -3, 4, 2, 4.5] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "tension": 0.5, + "fill": "origin" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-origin.json b/test/fixtures/plugin.filler/fill-radar-boundary-origin.json index 20abe5ce6..4c2068134 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-origin.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-origin.json @@ -1,48 +1,55 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 192, 0, 0.25)", - "data": [6, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(192, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 64, 192, 0.25)", - "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "origin" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 192, 0, 0.25)", + "data": [6, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(192, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 64, 192, 0.25)", + "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "origin" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-start-circular.json b/test/fixtures/plugin.filler/fill-radar-boundary-start-circular.json index a45fccd55..f10119f7a 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-start-circular.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-start-circular.json @@ -1,51 +1,58 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 255, 0, 0.25)", - "data": [6, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(255, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false, - "gridLines": { - "circular": true - } - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "start" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 255, 0, 0.25)", + "data": [6, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(255, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false, + "gridLines": { + "circular": true + } } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "start" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-start-span.json b/test/fixtures/plugin.filler/fill-radar-boundary-start-span.json index 0ae3843d8..66a0c83f7 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-start-span.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-start-span.json @@ -1,48 +1,55 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 255, 0, 0.25)", - "data": [6, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(255, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": true, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "start" - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 255, 0, 0.25)", + "data": [6, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(255, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": true, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "start" + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-boundary-start.json b/test/fixtures/plugin.filler/fill-radar-boundary-start.json index 10b126a46..faede3e5d 100644 --- a/test/fixtures/plugin.filler/fill-radar-boundary-start.json +++ b/test/fixtures/plugin.filler/fill-radar-boundary-start.json @@ -1,47 +1,54 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [null, null, 2, 3, 4, -4, -2, 1, 0] - }, { - "backgroundColor": "rgba(0, 255, 0, 0.25)", - "data": [6, 2, null, 4, 5, null, null, 2, 1] - }, { - "backgroundColor": "rgba(255, 0, 0, 0.25)", - "data": [7, 3, 4, 5, 6, 1, 4, null, null] - }, { - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [null, null, 2, 3, 4, -4, -2, 1, 0] }, - "options": { - "responsive": false, - "spanGaps": false, - "plugins": { - "legend": false, - "title": false - }, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": "start" - } - } + { + "backgroundColor": "rgba(0, 255, 0, 0.25)", + "data": [6, 2, null, 4, 5, null, null, 2, 1] + }, + { + "backgroundColor": "rgba(255, 0, 0, 0.25)", + "data": [7, 3, 4, 5, 6, 1, 4, null, null] + }, + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [8, 7, 6, -6, -4, -6, 4, 5, 8] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "plugins": { + "legend": false, + "title": false + }, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": "start" + } + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-dataset-border.json b/test/fixtures/plugin.filler/fill-radar-dataset-border.json index a42f5648c..b8774b380 100644 --- a/test/fixtures/plugin.filler/fill-radar-dataset-border.json +++ b/test/fixtures/plugin.filler/fill-radar-dataset-border.json @@ -1,57 +1,65 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(255, 0, 0, 0.25)", - "data": [null, null, 0, -1, 0, 1, 0, -1, 0], - "fill": 1 - }, { - "backgroundColor": "rgba(0, 255, 0, 0.25)", - "data": [1, 0, null, 1, 0, null, -1, 0, 1], - "fill": "+1" - }, { - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [0, 2, 0, -2, 0, 2, 0], - "fill": 3 - }, { - "backgroundColor": "rgba(255, 0, 255, 0.25)", - "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], - "fill": "-2" - }, { - "backgroundColor": "rgba(255, 255, 0, 0.25)", - "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], - "fill": "-1" - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(255, 0, 0, 0.25)", + "data": [null, null, 0, -1, 0, 1, 0, -1, 0], + "fill": 1 }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "black", - "borderWidth": 5, - "tension": 0 - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 255, 0, 0.25)", + "data": [1, 0, null, 1, 0, null, -1, 0, 1], + "fill": "+1" + }, + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [0, 2, 0, -2, 0, 2, 0], + "fill": 3 + }, + { + "backgroundColor": "rgba(255, 0, 255, 0.25)", + "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], + "fill": "-2" + }, + { + "backgroundColor": "rgba(255, 255, 0, 0.25)", + "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], + "fill": "-1" } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "black", + "borderWidth": 5, + "tension": 0 + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-dataset-order.js b/test/fixtures/plugin.filler/fill-radar-dataset-order.js index f24fc306f..1e800486f 100644 --- a/test/fixtures/plugin.filler/fill-radar-dataset-order.js +++ b/test/fixtures/plugin.filler/fill-radar-dataset-order.js @@ -23,8 +23,10 @@ module.exports = { title: false, tooltip: false }, - scale: { - display: false + scales: { + r: { + display: false + } } } } diff --git a/test/fixtures/plugin.filler/fill-radar-dataset-span.json b/test/fixtures/plugin.filler/fill-radar-dataset-span.json index dd57cc5c1..aaff57cf4 100644 --- a/test/fixtures/plugin.filler/fill-radar-dataset-span.json +++ b/test/fixtures/plugin.filler/fill-radar-dataset-span.json @@ -1,56 +1,64 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(255, 0, 0, 0.25)", - "data": [null, null, 0, -1, 0, 1, 0, -1, 0], - "fill": 1 - }, { - "backgroundColor": "rgba(0, 255, 0, 0.25)", - "data": [1, 0, null, 1, 0, null, -1, 0, 1], - "fill": "+1" - }, { - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [0, 2, 0, -2, 0, 2, 0], - "fill": 3 - }, { - "backgroundColor": "rgba(255, 0, 255, 0.25)", - "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], - "fill": "-2" - }, { - "backgroundColor": "rgba(255, 255, 0, 0.25)", - "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], - "fill": "-1" - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(255, 0, 0, 0.25)", + "data": [null, null, 0, -1, 0, 1, 0, -1, 0], + "fill": 1 }, - "options": { - "responsive": false, - "spanGaps": true, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "tension": 0 - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 255, 0, 0.25)", + "data": [1, 0, null, 1, 0, null, -1, 0, 1], + "fill": "+1" + }, + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [0, 2, 0, -2, 0, 2, 0], + "fill": 3 + }, + { + "backgroundColor": "rgba(255, 0, 255, 0.25)", + "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], + "fill": "-2" + }, + { + "backgroundColor": "rgba(255, 255, 0, 0.25)", + "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], + "fill": "-1" } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": true, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "tension": 0 + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-dataset-spline.json b/test/fixtures/plugin.filler/fill-radar-dataset-spline.json index 4b24e173e..ec34870e6 100644 --- a/test/fixtures/plugin.filler/fill-radar-dataset-spline.json +++ b/test/fixtures/plugin.filler/fill-radar-dataset-spline.json @@ -1,55 +1,63 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(255, 0, 0, 0.25)", - "data": [null, null, 0, -1, 0, 1, 0, -1, 0], - "fill": 1 - }, { - "backgroundColor": "rgba(0, 255, 0, 0.25)", - "data": [1, 0, null, 1, 0, null, -1, 0, 1], - "fill": "+1" - }, { - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [0, 2, 0, -2, 0, 2, 0], - "fill": 3 - }, { - "backgroundColor": "rgba(255, 0, 255, 0.25)", - "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], - "fill": "-2" - }, { - "backgroundColor": "rgba(255, 255, 0, 0.25)", - "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], - "fill": "-1" - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(255, 0, 0, 0.25)", + "data": [null, null, 0, -1, 0, 1, 0, -1, 0], + "fill": 1 }, - "options": { - "responsive": false, - "spanGaps": false, - "plugins": { - "legend": false, - "title": false - }, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "tension": 0.5 - } - } + { + "backgroundColor": "rgba(0, 255, 0, 0.25)", + "data": [1, 0, null, 1, 0, null, -1, 0, 1], + "fill": "+1" + }, + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [0, 2, 0, -2, 0, 2, 0], + "fill": 3 + }, + { + "backgroundColor": "rgba(255, 0, 255, 0.25)", + "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], + "fill": "-2" + }, + { + "backgroundColor": "rgba(255, 255, 0, 0.25)", + "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], + "fill": "-1" } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "plugins": { + "legend": false, + "title": false + }, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "tension": 0.5 + } + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-dataset.json b/test/fixtures/plugin.filler/fill-radar-dataset.json index e4cd431b5..2a35cfe7f 100644 --- a/test/fixtures/plugin.filler/fill-radar-dataset.json +++ b/test/fixtures/plugin.filler/fill-radar-dataset.json @@ -1,56 +1,64 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(255, 0, 0, 0.25)", - "data": [null, null, 0, -1, 0, 1, 0, -1, 0], - "fill": 1 - }, { - "backgroundColor": "rgba(0, 255, 0, 0.25)", - "data": [1, 0, null, 1, 0, null, -1, 0, 1], - "fill": "+1" - }, { - "backgroundColor": "rgba(0, 0, 255, 0.25)", - "data": [0, 2, 0, -2, 0, 2, 0], - "fill": 3 - }, { - "backgroundColor": "rgba(255, 0, 255, 0.25)", - "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], - "fill": "-2" - }, { - "backgroundColor": "rgba(255, 255, 0, 0.25)", - "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], - "fill": "-1" - }] + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(255, 0, 0, 0.25)", + "data": [null, null, 0, -1, 0, 1, 0, -1, 0], + "fill": 1 }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "tension": 0 - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + { + "backgroundColor": "rgba(0, 255, 0, 0.25)", + "data": [1, 0, null, 1, 0, null, -1, 0, 1], + "fill": "+1" + }, + { + "backgroundColor": "rgba(0, 0, 255, 0.25)", + "data": [0, 2, 0, -2, 0, 2, 0], + "fill": 3 + }, + { + "backgroundColor": "rgba(255, 0, 255, 0.25)", + "data": [2, 0, -2, 0, 2, 0, -2, 0, 2], + "fill": "-2" + }, + { + "backgroundColor": "rgba(255, 255, 0, 0.25)", + "data": [3, 1, -1, -3, -1, 1, 3, 1, -1], + "fill": "-1" } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "tension": 0 + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/plugin.filler/fill-radar-value.json b/test/fixtures/plugin.filler/fill-radar-value.json index d6e91c240..882b536ba 100644 --- a/test/fixtures/plugin.filler/fill-radar-value.json +++ b/test/fixtures/plugin.filler/fill-radar-value.json @@ -1,42 +1,46 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], - "datasets": [{ - "backgroundColor": "rgba(0, 0, 192, 0.25)", - "data": [0, -4, 2, 4, 2, 1, -1, 1, 2] - }] - }, - "options": { - "responsive": false, - "spanGaps": false, - "scale": { - "display": false, - "gridLines": { - "circular": true - } - }, - "elements": { - "point": { - "radius": 0 - }, - "line": { - "borderColor": "transparent", - "fill": { "value": 3 } - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false - } + "config": { + "type": "radar", + "data": { + "labels": ["0", "1", "2", "3", "4", "5", "6", "7", "8"], + "datasets": [ + { + "backgroundColor": "rgba(0, 0, 192, 0.25)", + "data": [0, -4, 2, 4, 2, 1, -1, 1, 2] } + ] }, "options": { - "canvas": { - "height": 256, - "width": 256 + "responsive": false, + "spanGaps": false, + "scales": { + "r": { + "display": false, + "gridLines": { + "circular": true + } + } + }, + "elements": { + "point": { + "radius": 0 + }, + "line": { + "borderColor": "transparent", + "fill": { "value": 3 } } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false + } + } + }, + "options": { + "canvas": { + "height": 256, + "width": 256 } + } } diff --git a/test/fixtures/scale.radialLinear/anglelines-disable.json b/test/fixtures/scale.radialLinear/anglelines-disable.json index 21b6b5eb3..2551b69a1 100644 --- a/test/fixtures/scale.radialLinear/anglelines-disable.json +++ b/test/fixtures/scale.radialLinear/anglelines-disable.json @@ -1,26 +1,28 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["A", "B", "C", "D", "E"] - }, - "options": { - "responsive": false, - "scale": { - "gridLines": { - "color": "rgb(0, 0, 0)", - "lineWidth": 1 - }, - "angleLines": { - "display": false - }, - "pointLabels": { - "display": false - }, - "ticks": { - "display": false - } - } + "config": { + "type": "radar", + "data": { + "labels": ["A", "B", "C", "D", "E"] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "gridLines": { + "color": "rgb(0, 0, 0)", + "lineWidth": 1 + }, + "angleLines": { + "display": false + }, + "pointLabels": { + "display": false + }, + "ticks": { + "display": false + } } + } } + } } diff --git a/test/fixtures/scale.radialLinear/anglelines-indexable.js b/test/fixtures/scale.radialLinear/anglelines-indexable.js index 1b2beac62..2d0b6cb52 100644 --- a/test/fixtures/scale.radialLinear/anglelines-indexable.js +++ b/test/fixtures/scale.radialLinear/anglelines-indexable.js @@ -6,19 +6,21 @@ module.exports = { }, options: { responsive: false, - scale: { - gridLines: { - display: true, - }, - angleLines: { - color: ['red', 'green'], - lineWidth: [1, 5] - }, - pointLabels: { - display: false - }, - ticks: { - display: false + scales: { + r: { + gridLines: { + display: true, + }, + angleLines: { + color: ['red', 'green'], + lineWidth: [1, 5] + }, + pointLabels: { + display: false + }, + ticks: { + display: false + } } } } diff --git a/test/fixtures/scale.radialLinear/anglelines-scriptable.js b/test/fixtures/scale.radialLinear/anglelines-scriptable.js index fad8dedb9..96f117103 100644 --- a/test/fixtures/scale.radialLinear/anglelines-scriptable.js +++ b/test/fixtures/scale.radialLinear/anglelines-scriptable.js @@ -6,23 +6,25 @@ module.exports = { }, options: { responsive: false, - scale: { - gridLines: { - display: true, - }, - angleLines: { - color: function(context) { - return context.index % 2 === 0 ? 'red' : 'green'; + scales: { + r: { + gridLines: { + display: true, }, - lineWidth: function(context) { - return context.index % 2 === 0 ? 1 : 5; + angleLines: { + color: function(context) { + return context.index % 2 === 0 ? 'red' : 'green'; + }, + lineWidth: function(context) { + return context.index % 2 === 0 ? 1 : 5; + }, }, - }, - pointLabels: { - display: false - }, - ticks: { - display: false + pointLabels: { + display: false + }, + ticks: { + display: false + } } } } diff --git a/test/fixtures/scale.radialLinear/border-dash.json b/test/fixtures/scale.radialLinear/border-dash.json index 6d9e3b879..ec683c4c6 100644 --- a/test/fixtures/scale.radialLinear/border-dash.json +++ b/test/fixtures/scale.radialLinear/border-dash.json @@ -1,31 +1,33 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["A", "B", "C", "D", "E"] - }, - "options": { - "responsive": false, - "scale": { - "gridLines": { - "color": "rgba(0, 0, 255, 0.5)", - "lineWidth": 1, - "borderDash": [4, 2], - "borderDashOffset": 2 - }, - "angleLines": { - "color": "rgba(0, 0, 255, 0.5)", - "lineWidth": 1, - "borderDash": [4, 2], - "borderDashOffset": 2 - }, - "pointLabels": { - "display": false - }, - "ticks": { - "display": false - } - } + "config": { + "type": "radar", + "data": { + "labels": ["A", "B", "C", "D", "E"] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "gridLines": { + "color": "rgba(0, 0, 255, 0.5)", + "lineWidth": 1, + "borderDash": [4, 2], + "borderDashOffset": 2 + }, + "angleLines": { + "color": "rgba(0, 0, 255, 0.5)", + "lineWidth": 1, + "borderDash": [4, 2], + "borderDashOffset": 2 + }, + "pointLabels": { + "display": false + }, + "ticks": { + "display": false + } } + } } + } } diff --git a/test/fixtures/scale.radialLinear/circular-border-dash.json b/test/fixtures/scale.radialLinear/circular-border-dash.json index a1afb2ec9..c6b0ad5f9 100644 --- a/test/fixtures/scale.radialLinear/circular-border-dash.json +++ b/test/fixtures/scale.radialLinear/circular-border-dash.json @@ -1,32 +1,34 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["A", "B", "C", "D", "E"] - }, - "options": { - "responsive": false, - "scale": { - "gridLines": { - "circular": true, - "color": "rgba(0, 0, 255, 0.5)", - "lineWidth": 1, - "borderDash": [4, 2], - "borderDashOffset": 2 - }, - "angleLines": { - "color": "rgba(0, 0, 255, 0.5)", - "lineWidth": 1, - "borderDash": [4, 2], - "borderDashOffset": 2 - }, - "pointLabels": { - "display": false - }, - "ticks": { - "display": false - } - } + "config": { + "type": "radar", + "data": { + "labels": ["A", "B", "C", "D", "E"] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "gridLines": { + "circular": true, + "color": "rgba(0, 0, 255, 0.5)", + "lineWidth": 1, + "borderDash": [4, 2], + "borderDashOffset": 2 + }, + "angleLines": { + "color": "rgba(0, 0, 255, 0.5)", + "lineWidth": 1, + "borderDash": [4, 2], + "borderDashOffset": 2 + }, + "pointLabels": { + "display": false + }, + "ticks": { + "display": false + } } + } } + } } diff --git a/test/fixtures/scale.radialLinear/gridlines-disable.json b/test/fixtures/scale.radialLinear/gridlines-disable.json index bc5c60ed4..45f8b8b12 100644 --- a/test/fixtures/scale.radialLinear/gridlines-disable.json +++ b/test/fixtures/scale.radialLinear/gridlines-disable.json @@ -1,26 +1,28 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["A", "B", "C", "D", "E"] - }, - "options": { - "responsive": false, - "scale": { - "gridLines": { - "display": false - }, - "angleLines": { - "color": "rgb(0, 0, 0)", - "lineWidth": 1 - }, - "pointLabels": { - "display": false - }, - "ticks": { - "display": false - } - } + "config": { + "type": "radar", + "data": { + "labels": ["A", "B", "C", "D", "E"] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "gridLines": { + "display": false + }, + "angleLines": { + "color": "rgb(0, 0, 0)", + "lineWidth": 1 + }, + "pointLabels": { + "display": false + }, + "ticks": { + "display": false + } } + } } + } } diff --git a/test/fixtures/scale.radialLinear/gridlines-no-z.json b/test/fixtures/scale.radialLinear/gridlines-no-z.json index 50b4d202b..6252753b3 100644 --- a/test/fixtures/scale.radialLinear/gridlines-no-z.json +++ b/test/fixtures/scale.radialLinear/gridlines-no-z.json @@ -1,37 +1,41 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["A", "B", "C", "D", "E"], - "datasets": [{ - "backgroundColor": "rgba(255, 0, 0, 1)", - "data": [1,2,3,3,3] - }] - }, - "options": { - "responsive": false, - "scale": { - "gridLines": { - "color": "rgba(0, 0, 0, 1)", - "lineWidth": 1 - }, - "angleLines": { - "color": "rgba(0, 0, 255, 1)", - "lineWidth": 1 - }, - "pointLabels": { - "display": false - }, - "ticks": { - "display": false - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false, - "filler": true - } + "config": { + "type": "radar", + "data": { + "labels": ["A", "B", "C", "D", "E"], + "datasets": [ + { + "backgroundColor": "rgba(255, 0, 0, 1)", + "data": [1, 2, 3, 3, 3] } + ] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "gridLines": { + "color": "rgba(0, 0, 0, 1)", + "lineWidth": 1 + }, + "angleLines": { + "color": "rgba(0, 0, 255, 1)", + "lineWidth": 1 + }, + "pointLabels": { + "display": false + }, + "ticks": { + "display": false + } + } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false, + "filler": true + } } + } } diff --git a/test/fixtures/scale.radialLinear/gridlines-scriptable.js b/test/fixtures/scale.radialLinear/gridlines-scriptable.js index 5283884cc..280875c1e 100644 --- a/test/fixtures/scale.radialLinear/gridlines-scriptable.js +++ b/test/fixtures/scale.radialLinear/gridlines-scriptable.js @@ -6,25 +6,27 @@ module.exports = { }, options: { responsive: false, - scale: { - gridLines: { - display: true, - color: function(context) { - return context.index % 2 === 0 ? 'red' : 'green'; + scales: { + r: { + gridLines: { + display: true, + color: function(context) { + return context.index % 2 === 0 ? 'red' : 'green'; + }, + lineWidth: function(context) { + return context.index % 2 === 0 ? 1 : 5; + }, }, - lineWidth: function(context) { - return context.index % 2 === 0 ? 1 : 5; + angleLines: { + color: 'rgba(255, 255, 255, 0.5)', + lineWidth: 2 }, - }, - angleLines: { - color: 'rgba(255, 255, 255, 0.5)', - lineWidth: 2 - }, - pointLabels: { - display: false - }, - ticks: { - display: false + pointLabels: { + display: false + }, + ticks: { + display: false + } } } } diff --git a/test/fixtures/scale.radialLinear/gridlines-z.json b/test/fixtures/scale.radialLinear/gridlines-z.json index 4da021e0c..70b1e456a 100644 --- a/test/fixtures/scale.radialLinear/gridlines-z.json +++ b/test/fixtures/scale.radialLinear/gridlines-z.json @@ -1,38 +1,42 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["A", "B", "C", "D", "E"], - "datasets": [{ - "backgroundColor": "rgba(255, 0, 0, 1)", - "data": [1,2,3,3,3] - }] - }, - "options": { - "responsive": false, - "scale": { - "gridLines": { - "color": "rgba(0, 0, 0, 1)", - "lineWidth": 1, - "z": 1 - }, - "angleLines": { - "color": "rgba(0, 0, 255, 1)", - "lineWidth": 1 - }, - "pointLabels": { - "display": false - }, - "ticks": { - "display": false - } - }, - "plugins": { - "legend": false, - "title": false, - "tooltip": false, - "filler": true + "config": { + "type": "radar", + "data": { + "labels": ["A", "B", "C", "D", "E"], + "datasets": [ + { + "backgroundColor": "rgba(255, 0, 0, 1)", + "data": [1, 2, 3, 3, 3] + } + ] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "gridLines": { + "color": "rgba(0, 0, 0, 1)", + "lineWidth": 1, + "z": 1 + }, + "angleLines": { + "color": "rgba(0, 0, 255, 1)", + "lineWidth": 1 + }, + "pointLabels": { + "display": false + }, + "ticks": { + "display": false } } + }, + "plugins": { + "legend": false, + "title": false, + "tooltip": false, + "filler": true + } } + } } diff --git a/test/fixtures/scale.radialLinear/indexable-gridlines.json b/test/fixtures/scale.radialLinear/indexable-gridlines.json index d10b0d81f..8c8dde5ce 100644 --- a/test/fixtures/scale.radialLinear/indexable-gridlines.json +++ b/test/fixtures/scale.radialLinear/indexable-gridlines.json @@ -1,39 +1,41 @@ { - "config": { - "type": "radar", - "data": { - "labels": ["A", "B", "C", "D", "E"] - }, - "options": { - "responsive": false, - "scale": { - "gridLines": { - "display": true, - "color": [ - "rgba(0, 0, 0, 0.5)", - "rgba(255, 255, 255, 0.5)", - false, - "", - "rgba(255, 0, 0, 0.5)", - "rgba(0, 255, 0, 0.5)", - "rgba(0, 0, 255, 0.5)", - "rgba(255, 255, 0, 0.5)", - "rgba(255, 0, 255, 0.5)", - "rgba(0, 255, 255, 0.5)" - ], - "lineWidth": [false, 0, 1, 2, 1, 2, 1, 2, 1, 2] - }, - "angleLines": { - "color": "rgba(255, 255, 255, 0.5)", - "lineWidth": 2 - }, - "pointLabels": { - "display": false - }, - "ticks": { - "display": false - } - } + "config": { + "type": "radar", + "data": { + "labels": ["A", "B", "C", "D", "E"] + }, + "options": { + "responsive": false, + "scales": { + "r": { + "gridLines": { + "display": true, + "color": [ + "rgba(0, 0, 0, 0.5)", + "rgba(255, 255, 255, 0.5)", + false, + "", + "rgba(255, 0, 0, 0.5)", + "rgba(0, 255, 0, 0.5)", + "rgba(0, 0, 255, 0.5)", + "rgba(255, 255, 0, 0.5)", + "rgba(255, 0, 255, 0.5)", + "rgba(0, 255, 255, 0.5)" + ], + "lineWidth": [false, 0, 1, 2, 1, 2, 1, 2, 1, 2] + }, + "angleLines": { + "color": "rgba(255, 255, 255, 0.5)", + "lineWidth": 2 + }, + "pointLabels": { + "display": false + }, + "ticks": { + "display": false + } } + } } + } } diff --git a/test/specs/controller.radar.tests.js b/test/specs/controller.radar.tests.js index ba149c14b..9a9581fd5 100644 --- a/test/specs/controller.radar.tests.js +++ b/test/specs/controller.radar.tests.js @@ -389,7 +389,11 @@ describe('Chart.controllers.radar', function() { labels: ['label1', 'label2', 'label3', 'label4'] }, options: { - scale: {id: 'test'} + scales: { + test: { + axis: 'r' + } + } } }); diff --git a/test/specs/core.controller.tests.js b/test/specs/core.controller.tests.js index ddb83d9b5..3b6b68db6 100644 --- a/test/specs/core.controller.tests.js +++ b/test/specs/core.controller.tests.js @@ -342,11 +342,12 @@ describe('Chart', function() { var chart = acquireChart({ type: 'line', options: { - scale: { - id: 'foo', - type: 'logarithmic', - _jasmineCheckC: 'c2', - _jasmineCheckD: 'd2' + scales: { + foo: { + type: 'logarithmic', + _jasmineCheckC: 'c2', + _jasmineCheckD: 'd2' + } } } }); diff --git a/test/specs/scale.radialLinear.tests.js b/test/specs/scale.radialLinear.tests.js index 894df96d9..be0c701ae 100644 --- a/test/specs/scale.radialLinear.tests.js +++ b/test/specs/scale.radialLinear.tests.js @@ -166,9 +166,11 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6'] }, options: { - scale: { - suggestedMin: -10, - suggestedMax: 10 + scales: { + r: { + suggestedMin: -10, + suggestedMax: 10 + } } } }); @@ -187,9 +189,11 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5', 'label6'] }, options: { - scale: { - min: -1010, - max: 1010 + scales: { + r: { + min: -1010, + max: 1010 + } } } }); @@ -209,8 +213,10 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4'] }, options: { - scale: { - beginAtZero: false + scales: { + r: { + beginAtZero: false + } } } }); @@ -243,8 +249,10 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - reverse: true + scales: { + r: { + reverse: true + } } } }); @@ -264,9 +272,11 @@ describe('Test the radial linear scale', function() { }] }, options: { - scale: { - pointLabels: { - display: false + scales: { + r: { + pointLabels: { + display: false + } } } } @@ -301,10 +311,12 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - ticks: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + ticks: { + callback: function(value, index) { + return index.toString(); + } } } } @@ -325,10 +337,12 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - pointLabels: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + pointLabels: { + callback: function(value, index) { + return index.toString(); + } } } } @@ -362,10 +376,12 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - pointLabels: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + pointLabels: { + callback: function(value, index) { + return index.toString(); + } } } } @@ -387,10 +403,12 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - pointLabels: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + pointLabels: { + callback: function(value, index) { + return index.toString(); + } } } } @@ -409,10 +427,12 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - pointLabels: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + pointLabels: { + callback: function(value, index) { + return index.toString(); + } } } } @@ -443,10 +463,12 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - pointLabels: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + pointLabels: { + callback: function(value, index) { + return index.toString(); + } } } } @@ -476,10 +498,12 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - pointLabels: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + pointLabels: { + callback: function(value, index) { + return index.toString(); + } } } }, @@ -515,14 +539,16 @@ describe('Test the radial linear scale', function() { labels: ['label1', 'label2', 'label3', 'label4', 'label5'] }, options: { - scale: { - pointLabels: { - callback: function(value, index) { - return index.toString(); + scales: { + r: { + pointLabels: { + callback: function(value, index) { + return index.toString(); + } + }, + ticks: { + display: false } - }, - ticks: { - display: false } } } diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 200ec1379..b6827e759 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -446,7 +446,6 @@ export declare class Chart< readonly currentDevicePixelRatio: number; readonly chartArea: ChartArea; readonly scales: { [key: string]: Scale }; - readonly scale: Scale | undefined; readonly attached: boolean; data: ChartData;