Repository navigation
Decreased show/hide trace performance #1623
Description
Activity
Thanks for posting.
This is probably a side effect of #1432
This perf decrease in indeed a side-effect of #1432 where we added double click interactions on legend items.
@MarvinGee #1432 was first released in
v1.25.0, so we should be able to upgrade tov1.24.2without seeing this issue.
This perf 📉 is due to this
setTimeoutwhere we wait 300ms in case another mouse up/down combo comes in - which effectively adds 300ms to every single-click legend item interaction 🐢 .To mitigate the problem, we could add a config option to disable double-click interactions on legend items which would remove that
setTimeoutwhen turned on.Fixing the problem will be a little trickier. We can't make double-clicks first call the single-click
restyleand then some otherrestylebecause the first click would hide the trace and then the second click would make that same trace visible again which isn't particularly desirable.I get the feeling that we should drop those legend double click interactions in
v2. Greater than 300ms trace toggles are unacceptable (I really which I would've thought about that while reviewing #1432 😡 )@rpaskowitz @alexcjohnson any thoughts on this?
I find some of the hover behaviour and the checkmark not going away but the series just becoming faded a bit weird, but here's an example of how Richshaw does it - http://code.shutterstock.com/rickshaw/examples/legend.html
The checkmarks control series visibility in the way that a single click does in Plotly, while clicking on the series name causes just that series to be shown.
Another pattern I've seen, but can't find an example of offhand is to show an 'Only' button beside or on a series, normally tied to a hover event.
I like the idea of an "only" button that appears on hover - perhaps an 👁 icon at the right edge of the label? I don't think that would need to wait for v2, as no functionality would disappear, we'd just turn a doubleclick into a more specific single-click. It would also make this feature more discoverable 🎉
Reacted by hwHi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
Hello,
I upgraded my plotly version from 1.16.0 to 1.25.0. With this update the delay when showing or hiding a trace got noticably longer. I tried to reproduce the issue in this codepen. When changing the plotly version from 1.16.0 to 1.25.0 in the html part the difference becomes apparent, when showing or hiding a trace.
1.16.0 feels very responsive, almost instant, whereas 1.25.0 has a very noticable lag.