Replies: 1 comment
-
Mmm are you sure it was not the modebar? In any case, here's a way to do it: layout:
height: 700
showlegend: false
updatemenus:
- buttons:
- args:
- layout:
showlegend: true
args2:
- layout:
showlegend: false
label: "toggle legend"
method: "animate"
direction: right
pad:
r: 10
t: 10
type: buttons
x: 1
xanchor: right
'y': 1
yanchor: top It's not perfect, but maybe you can improve it by making it set other properties like margins and whatnot. Please post your results if you end up with something useful! :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think I have seen somewhere in the past a ploly graph where the legend is hidden on default and can be brought up by pressing a button on the upper left corner.
The thing is, having a lot of different lines in one graph will take the legend a lot of screen space. However, it is still needed to enable/disable lines on the graph. A button hideable legend would be ideal for my purpose.
Beta Was this translation helpful? Give feedback.
All reactions