Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Is it possible to have two labels corresponding to one value for options variable?

$
0
0

Greetings, as the title states, I would like add an extra label for each value in my option.

For example

OPTIONS = [
{'label': 'A', 'value': 'A'},
 {'label': 'AA', 'value': 'AA'},
 {'label': 'AAL', 'value': 'AAL'},
 {'label': 'AAP', 'value': 'AAP'}
]

to this:

OPTIONS = [
{'label': ['A', 'companyname'], 'value': 'A'},
 {'label': ['AA', 'companyname'], 'value': 'AA'},
 {'label': ['AAL', 'companyname'], 'value': 'AAL'},
 {'label': ['AAP', 'companyname'], 'value': 'AAP'}
]

This would make my dashboard much more user friendly, any would allow for people to search for either a company name or its stock symbol in my multi-dropdown.

Has anyone gotten this to work for them?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images