Multiple value to single lable in plotly/dash

Viewed 40

I'm pretty new to asking on stackoverflow, hence I try my best to follow the rules.

I'm currently working on a sideproject, where I illustrate data using dash and plotly with python. I created a dropdown for clearness but I want to display multiple lines, when I select one option. This is how I do it currently:

 dcc.Dropdown(id='dropdown',
   options=[
     {'label': 'All cities in Hessen', 'value': 'hessen_cities'},
     {'label': 'All cities in BaWü', 'value': 'bawue_cities'},
     {'label': 'All cities in Bavaria', 'value': 'bavarian_cities'},
   ],
   optionHeight=35,
   value='all_activated',
   multi=False,
   searchable=True,
   placeholder='Please choose...',
   className='box'
)

but I want it like that:

 dcc.Dropdown(id='dropdown',
   options=[
     {'label': 'All cities in Hessen', 'value': ['hessen_cities', 'bawue_cities', 'bavarian_cities']},
   ],
   optionHeight=35,
   value='all_activated',
   multi=False, 
   searchable=True,
   placeholder='Please choose...',
   className='box'
)

multi=True is sadly not the solution for me. I basically want multiple px.line in one option...

0 Answers
Related