Skip to content

Instantly share code, notes, and snippets.

@moritzkoerber
Last active August 22, 2020 12:24
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/fa8b2bf24d29ba3e3d7aef59123a2a14 to your computer and use it in GitHub Desktop.
Save moritzkoerber/fa8b2bf24d29ba3e3d7aef59123a2a14 to your computer and use it in GitHub Desktop.
df["scoops"] = df["ice_cream_cones"] * 2
fig.update_layout(
updatemenus=[
dict(
type="buttons",
direction="right",
x=0.7,
y=1.2,
showactive=True,
buttons=list(
[
dict(
label="Cones",
method="update",
args=[{"y": [df["ice_cream_cones"], df["drinks"]]}],
),
dict(
label="Scoops",
method="update",
args=[{"y": [df["scoops"], df["drinks"]]}],
),
]
),
)
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment