Skip to content

Commit 13d013d

Browse files
committed
fix issue where some scatter traces would lose fill after series of hide/show operations in legend
1 parent 27a23e1 commit 13d013d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/traces/scatter/plot.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ function createFills(gd, traceJoin, plotinfo) {
8383

8484
var trace = d[0].trace;
8585

86+
trace._ownFill = null;
87+
trace._nextFill = null;
88+
8689
var fillData = [];
8790
if(trace._ownfill) fillData.push('_ownFill');
8891
if(trace._nexttrace) fillData.push('_nextFill');
@@ -91,9 +94,7 @@ function createFills(gd, traceJoin, plotinfo) {
9194

9295
fillJoin.enter().append('g');
9396

94-
fillJoin.exit()
95-
.each(function(d) { trace[d] = null; })
96-
.remove();
97+
fillJoin.exit().remove();
9798

9899
fillJoin.order().each(function(d) {
99100
// make a path element inside the fill group, just so

0 commit comments

Comments
 (0)