mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
Don't make legend empty when fill is false (#6719)
This commit is contained in:
parent
c44229fb96
commit
a307a2a63d
@ -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;
|
||||
|
@ -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: [],
|
||||
@ -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: [],
|
||||
|
Loading…
Reference in New Issue
Block a user