brentp / somalier

fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs... "like damn that is one smart wine guy"
MIT License
262 stars 35 forks source link

.html - toggling 'unrelated' data on/off makes portion of 'related' data invisible #15

Closed JosephMcCarter closed 5 years ago

JosephMcCarter commented 5 years ago

Toggling the 'unrelated' data by clicking the blue legend marker makes a portion of the 'related' data invisible;

Screen Shot 2019-03-27 at 6 02 38 PM

Screen Shot 2019-03-27 at 6 02 48 PM

brentp commented 5 years ago

hmm. I can see this. I'll see what I can do.

brentp commented 5 years ago

this seems to be a bug in plotly or the webgl lib upstream of plotly. I can get around it by changing:

        ix: x_data[i].ix,
        type: 'scattergl',

to:

        ix: x_data[i].ix,
        type: x_data[i].ix.length > 9999 ? 'scattergl' : 'scatter',

which you could try in your html directly. But, it has the consequence of having the blue points hide some of the red ones which is probably worse. I think I'll have to leave this as-is and hope it gets fixed upstream--there are several issues in plotly related to this, it seems to happen after >100K points and you have > 200K.

brentp commented 5 years ago

this should be fixed in latest release. if not, please re-open.