Skip to content

Instantly share code, notes, and snippets.

@moritzkoerber
Created August 22, 2020 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritzkoerber/158a48f36bcdc68b54a8ac6cfa1db851 to your computer and use it in GitHub Desktop.
Save moritzkoerber/158a48f36bcdc68b54a8ac6cfa1db851 to your computer and use it in GitHub Desktop.
fig.update_layout(
updatemenus=[
dict(
type="buttons",
direction="right",
x=0.7,
y=1.2,
showactive=True,
buttons=list(
[
dict(
label="Ice Cream",
method="update",
args=[
{"visible": [True, False]},
{"yaxis.title.text": "Cones Sold",},
],
),
dict(
label="Drinks",
method="update",
args=[
{"visible": [False, True]},
{"yaxis.title.text": "Drinks Sold"},
],
),
]
),
)
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment