Clicking legend entry causes legend to scroll

Some of my plots have many traces, enough to produce a scroll bar in the legend, and when i click on one with the intent to toggle it on or off, the click scrolls the legend rather than toggling on, which makes it almost impossible to toggle a trace on, am I doing something wrong?

1 Like

Can you share your graph to help us debug?

The problem occurred when generating an offline plot. I just put it online now, and noticed some slightly different functionality of the legend when editing it using plot.ly/create. When editing with plot.ly/create it seems like the legend scroll happens automatically with mouse movements, this doesnt happen in offline mode.

Here is the link to the plot:
https://plot.ly/~tfg250/27/mbe-a1-comp-moment-distribution-factors/

thanks

Still seeing this strange behavior in offline plots, i think it has something to do with the default behavior for mouse hover over the legend. When editing online the legend scrolls automatically with moving the cursor, this doesn’t happen in offline mode. So when i click on a legend item in the online editor, its interpreted as toggling a trace on or off, but when i click on a legend item in offline mode its interpreted as a scroll. is there any way to change this?

I’ve got the same issue with some plots I’m creating, it almost seems like its an issue with the browser as it comes and goes.

I was thinking that maybe the js hasn’t loaded all the way sometimes, but really I’m not sure. This plot was buggy the first time I loaded it up then worked the next?

https://www.wcc.nrcs.usda.gov/ftpref/states/ut/plotly/misc/sandbox/NV_CA_BasinCurrSWE.html

This is also an issue for me. I use plotly offline in python jupyter notebooks, and most of my plots have a lot of data and a lot of legend entries. It looks like just a bug, clicking 35% from the bottom of the /view/ of the legend causes the scrollbar to move to the 35% point.

I see this all the time also, was too lazy to file a bug report myself. Happens to me in Chrome but not in Firefox.

I’ve since kind of realized that if you don’t let the page load completely before manipulating it, scrolling, selecting legend, etc it has this behavior. If you let the page load completely it doesn’t seem to happen. This is true for offline charts as well as those produced in my #dash app.

I too am using chrome.

I have stopped making plots with a long legend lists because of this problem, and have since removed the plot I linked in my original post, but just so there is a plot that demonstrates this behavior on this thread, here another plot with the same problem:

https://plot.ly/~tfg250/49/mbe-a1-moment-summary/

I’m experiencing the same problem. It appears that it was corrected in plotly.js on Feb 28. I recently updated to the latest versrions of plotly and dash and it still persists. Don’t know whether that’s to be expected or I need to update a different module.

[edit] actually my dash-core-components was outdated 0.21.rc1 because I require the old Tabs functionality. It appears to use an older plotly-1.33.1.min.js. I fixed the issue by manually patching it to the latest plotly.js