Skip to content

Commit a307a2a

Browse files
benmccannetimberg
authored andcommitted
Don't make legend empty when fill is false (#6719)
1 parent c44229f commit a307a2a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/core.datasetController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ helpers.extend(DatasetController.prototype, {
347347
}
348348

349349
if (style.fill === false || style.fill === null) {
350-
style.backgroundColor = 'rgba(0,0,0,0)';
350+
style.backgroundColor = style.borderColor;
351351
}
352352

353353
return style;

test/specs/plugin.legend.tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe('Legend block tests', function() {
149149
datasetIndex: 1
150150
}, {
151151
text: 'dataset3',
152-
fillStyle: 'rgba(0,0,0,0)',
152+
fillStyle: 'green',
153153
hidden: false,
154154
lineCap: 'butt',
155155
lineDash: [],
@@ -198,7 +198,7 @@ describe('Legend block tests', function() {
198198

199199
expect(chart.legend.legendItems).toEqual([{
200200
text: 'dataset3',
201-
fillStyle: 'rgba(0,0,0,0)',
201+
fillStyle: 'green',
202202
hidden: false,
203203
lineCap: 'butt',
204204
lineDash: [],

0 commit comments

Comments
 (0)