Skip to content

Commit

Permalink
Don't make legend empty when fill is false (#6719)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored and etimberg committed Nov 11, 2019
1 parent c44229f commit a307a2a
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a307a2a

Please sign in to comment.