Uh oh!
There was an error while loading. Please reload this page.
Fix - hide empty bars in interactive mode - #4522
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Thanks @archmoj for the quick fix. After some testing, looks like the behaviour is now correct. I am a little worried though about how complex the logic in At the very least, we should add two new variables to make the logic easier to digest:
which could be in // display zeros if line.width > 0if(isBlank&&shouldDisplayZeros&&helpers.getLineWidth(trace,di)&&(isHorizontal ? x1-x0===0 : y1-y0===0)){isBlank=false;}and below in if(!gd._context.staticPlot){// ...if(spansHorizontal){x0=fixpx(x0,x1);x1=fixpx(x1,x0);}if(spansVertical){y0=fixpx(y0,y1);y1=fixpx(y1,y0);}}instead of monkey-patching the Does that sound ok to you @archmoj ? |
archmoj
commented
Jan 29, 2020
@etpinard that makes sense. if(v===vc)returnv;to |
Hmm. Wouldn't that defeat the purpose of |
... and unfortunately we can't rely on the image tests here as this piece of logic in inside a |
archmoj
commented
Jan 29, 2020
OK. Addressing your #4522 (comment) sounds the safest fix. |
etpinard
commented
Jan 29, 2020
Yep, that's a step in the right direction - thanks 💃 |
Fixes#4499
before vs after
@plotly/plotly_js