Skip to content

Commit

Permalink
Don't make legend empty when fill is false
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Nov 8, 2019
1 parent a985fec commit 15dce00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/core/core.datasetController.js
Expand Up @@ -346,10 +346,6 @@ helpers.extend(DatasetController.prototype, {
style = me._resolveDataElementOptions(meta.data[index] || {}, index);
}

if (style.fill === false || style.fill === null) {
style.backgroundColor = 'rgba(0,0,0,0)';
}

return style;
},

Expand Down
4 changes: 2 additions & 2 deletions test/specs/plugin.legend.tests.js
Expand Up @@ -149,7 +149,7 @@ describe('Legend block tests', function() {
datasetIndex: 1
}, {
text: 'dataset3',
fillStyle: 'rgba(0,0,0,0)',
fillStyle: 'rgba(0,0,0,0.1)',
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: 'rgba(0,0,0,0.1)',
hidden: false,
lineCap: 'butt',
lineDash: [],
Expand Down

0 comments on commit 15dce00

Please sign in to comment.