]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Radar charts should fill to the center by default (#7446)
authorEvert Timberg <evert.timberg+github@gmail.com>
Sat, 30 May 2020 20:42:23 +0000 (16:42 -0400)
committerGitHub <noreply@github.com>
Sat, 30 May 2020 20:42:23 +0000 (16:42 -0400)
* Radar charts should fill to the center by default
* Update tests for new defaults

src/controllers/controller.radar.js
test/fixtures/controller.radar/backgroundColor/scriptable.js
test/fixtures/controller.radar/backgroundColor/value.js
test/fixtures/controller.radar/borderDash/scriptable.js

index a84d3bc31a5a57784779149cbe9a065902eb6830..b596f725afa9c127810ba0b55c41c7d2fe369cf1 100644 (file)
@@ -13,6 +13,7 @@ defaults.set('radar', {
        },
        elements: {
                line: {
+                       fill: 'start',
                        tension: 0 // no bezier in radar
                }
        }
index ee32bcf422e61368b0975e2f91d07434bf667701..0f5d313dd3ac19f28a5d2adca61457c24550dd8a 100644 (file)
@@ -30,7 +30,8 @@ module.exports = {
                                                return index === 0 ? '#ff0000'
                                                        : index === 1 ? '#00ff00'
                                                        : '#ff00ff';
-                                       }
+                                       },
+                                       fill: true,
                                },
                                point: {
                                        backgroundColor: '#0000ff',
index 0decaa6c079166027a94b7c55f459fb4a291f828..1c8651edb7c4a5937a2cb0c018e41f017e22fa5a 100644 (file)
@@ -20,7 +20,8 @@ module.exports = {
                        title: false,
                        elements: {
                                line: {
-                                       backgroundColor: '#00ff00'
+                                       backgroundColor: '#00ff00',
+                                       fill: true,
                                },
                                point: {
                                        radius: 10
index 0feed22cc0cc55c4b55f862712bba09d31320a7e..8415eff43fcb813bb22da9c3e9d02fc1e2b973ba 100644 (file)
@@ -25,7 +25,8 @@ module.exports = {
                                        borderColor: '#00ff00',
                                        borderDash: function(ctx) {
                                                return ctx.datasetIndex === 0 ? [5] : [10];
-                                       }
+                                       },
+                                       fill: true,
                                },
                                point: {
                                        radius: 10