Don't make legend empty when fill is false (#6719)

This commit is contained in:
Ben McCann 2019-11-10 17:03:30 -08:00 committed by Evert Timberg
parent c44229fb96
commit a307a2a63d
2 changed files with 3 additions and 3 deletions

View File

@ -347,7 +347,7 @@ helpers.extend(DatasetController.prototype, {
} }
if (style.fill === false || style.fill === null) { if (style.fill === false || style.fill === null) {
style.backgroundColor = 'rgba(0,0,0,0)'; style.backgroundColor = style.borderColor;
} }
return style; return style;

View File

@ -149,7 +149,7 @@ describe('Legend block tests', function() {
datasetIndex: 1 datasetIndex: 1
}, { }, {
text: 'dataset3', text: 'dataset3',
fillStyle: 'rgba(0,0,0,0)', fillStyle: 'green',
hidden: false, hidden: false,
lineCap: 'butt', lineCap: 'butt',
lineDash: [], lineDash: [],
@ -198,7 +198,7 @@ describe('Legend block tests', function() {
expect(chart.legend.legendItems).toEqual([{ expect(chart.legend.legendItems).toEqual([{
text: 'dataset3', text: 'dataset3',
fillStyle: 'rgba(0,0,0,0)', fillStyle: 'green',
hidden: false, hidden: false,
lineCap: 'butt', lineCap: 'butt',
lineDash: [], lineDash: [],