Skip to content

Commit

Permalink
Don't make legend empty when fill is false
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Nov 9, 2019
1 parent a985fec commit 2b1d5ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/core.datasetController.js
Expand Up @@ -347,7 +347,7 @@ helpers.extend(DatasetController.prototype, {
}

if (style.fill === false || style.fill === null) {
style.backgroundColor = 'rgba(0,0,0,0)';
style.backgroundColor = style.borderColor;
}

return style;
Expand Down
4 changes: 2 additions & 2 deletions test/specs/plugin.legend.tests.js
Expand Up @@ -149,7 +149,7 @@ describe('Legend block tests', function() {
datasetIndex: 1
}, {
text: 'dataset3',
fillStyle: 'rgba(0,0,0,0)',
fillStyle: 'green',
hidden: false,
lineCap: 'butt',
lineDash: [],
Expand Down Expand Up @@ -198,7 +198,7 @@ describe('Legend block tests', function() {

expect(chart.legend.legendItems).toEqual([{
text: 'dataset3',
fillStyle: 'rgba(0,0,0,0)',
fillStyle: 'green',
hidden: false,
lineCap: 'butt',
lineDash: [],
Expand Down

0 comments on commit 2b1d5ce

Please sign in to comment.