Skip to content

Commit 58cb8f4

Browse files
dyetpinard
authored andcommitted
Make proper fill behaviour
1 parent f235b0d commit 58cb8f4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/traces/scattergl/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,11 @@ ScatterGl.scene = function getScene(container, subplot) {
574574

575575
// draw traces in proper order
576576
scene.draw = function draw() {
577-
for(var i = 0; i < scene.count; i++) {
577+
var i;
578+
for(i = 0; i < scene.count; i++) {
578579
if(scene.fill2d) scene.fill2d.draw(i);
580+
}
581+
for(i = 0; i < scene.count; i++) {
579582
if(scene.line2d) {
580583
scene.line2d.draw(i);
581584
}
@@ -786,7 +789,7 @@ ScatterGl.plot = function plot(container, subplot, cdata) {
786789
if(scene.fill2d) {
787790
scene.fillOptions.forEach(function(fillOptions, i) {
788791
var cdscatter = cdata[i];
789-
if(!cdscatter || !cdscatter[0] || !cdscatter[0].trace) return;
792+
if(!fillOptions || !cdscatter || !cdscatter[0] || !cdscatter[0].trace) return;
790793
var cd = cdscatter[0];
791794
var trace = cd.trace;
792795
var stash = cd.t;

0 commit comments

Comments
 (0)