Open corneliusroemer opened 9 months ago
This might be what's happening: https://stackoverflow.com/questions/57839322/sad-face-on-canvas-in-chrome
Yes, this is a good observation! We have also observed browser-specific effects for sufficiently large altair
plots (it used to work on Safari but not Chrome, but now seems to work on Chrome I guess).
I think the real root of this problem is probably in the upstream altair
or vega-lite
packages, which is beyond scope of what I know how to fix.
There may be some way to refactor the way our plotting calls altair
to fix it by changing how plot is rendered in vega-lite
, but I'm not sure how?
Thanks! nsp3 is the biggest protein, 1800 long in total, I didn't have that on my radar, embarassingly
I found these vega(-lite) issues:
Seems like vega can't/won't fix this, but a workaround might be to test the max size of the canvas and at least show an error message when the canvas size is exceeded or even change how the plot is rendered. Might not be worth the hassle however. See: https://github.com/jhildenbiddle/canvas-size#canvas-size
Another workaround may be "If you use SVG, the chart should render." "Easiest solution is probs adding a canvas/SVG toggle and noting somewhere clear that "HEY IF THE PLOT GETS CUT OFF TRY SVG" (from https://github.com/biocore/qurro/issues/121)
I noticed that nsp3 (and only nsp3) viz is broken:
https://jbloomlab.github.io/SARS2-mut-fitness/nsp3.html
Others work just fine, e.g
Strangely it's browser dependent:
Version 1.60.118 Chromium: 119.0.6045.163 (Official Build) (arm64) https://brave.com/latest/)
Version 119.0.6045.199 (Official Build) (arm64)
Version 120.0
, also not incognitoConsole logs might help:
Firefox:
Chrome:
So the vega warning doesn't seem to be the root cause
Brave:
No difference in logs between Brave and Chrome, no errors in Brave as opposed to Firefox, still doesn't show.