Skip to content

Commit

Permalink
Backward compatible default fill for radar charts (#6655)
Browse files Browse the repository at this point in the history
* Backward compatible fill behavior for radar
  • Loading branch information
kurkle authored and etimberg committed Nov 2, 2019
1 parent a920bfe commit 1cce8a5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/controllers/controller.radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ defaults._set('radar', {
},
elements: {
line: {
fill: 'start',
tension: 0 // no bezier in radar
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
title: false,
elements: {
line: {
fill: true,
backgroundColor: function(ctx) {
var index = (ctx.dataIndex === undefined ? ctx.datasetIndex : ctx.dataIndex);
return index === 0 ? '#ff0000'
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/controller.radar/backgroundColor/value.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
title: false,
elements: {
line: {
fill: true,
backgroundColor: '#00ff00'
},
point: {
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/controller.radar/borderDash/scriptable.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
title: false,
elements: {
line: {
fill: true,
borderColor: '#00ff00',
borderDash: function(ctx) {
return ctx.datasetIndex === 0 ? [5] : [10];
Expand Down

0 comments on commit 1cce8a5

Please sign in to comment.