Skip to content

Instantly share code, notes, and snippets.

@Perishleaf
Created December 22, 2019 04:53
Show Gist options
  • Save Perishleaf/58dd429f346826d2f0280e5cd5e8a32c to your computer and use it in GitHub Desktop.
Save Perishleaf/58dd429f346826d2f0280e5cd5e8a32c to your computer and use it in GitHub Desktop.
# add a dropdown menu in the layout
layout.update(updatemenus=list([
dict(x=0,
y=1,
xanchor='left',
yanchor='middle',
buttons=list([
dict(
args=['visible', [True, False, False, False]],
label='Property type: Unit buy/M',
method='restyle'
),
dict(
args=['visible', [False, True, False, False]],
label='Property type: Unit rent',
method='restyle'
),
dict(
args=['visible', [False, False, True, False]],
label='Property type: House rent',
method='restyle'
),
dict(
args=['visible', [False, False, False, True]],
label='Property type: House buy/M',
method='restyle'
)
]),
)]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment