mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 20:29:12 +02:00
Don't make legend empty when fill is false (#6718)
This commit is contained in:
parent
11ef1e5e89
commit
49c4761e1b
@ -762,7 +762,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