How to select 'All' values of the dropdown to generate a graph

I have multiple dropdowns and output graphs where I need the default value to be All Items in the dropdown.
For that in options i added All as one of the options to the dropdown and tried to implement the code below.

Output(‘example-graph-1’, ‘figure’),
[Input(‘country’, ‘value’),
Input(‘network-type’, ‘value’) ])
def update_age_graph(selected_country ,selected_network):

if selected_country == 'All':
    country_list = list(pr_group['Nationality'].unique())
    country_list = country

for network in selected_network:
    if network == 'All':
        network_list = list(pr_group['NETWORK_TYPE'].unique())
        network_list = network

df = pr_group[pr_group['Nationality'].isin(country_list) & pr_group['NETWORK_TYPE'].isin(network_list)]
df = pd.DataFrame(df >> group_by(X.Age_band) >>
            summarize(Premium = X.Premium_collected.sum()))
return {
    'data': [ go.Bar(x =  df['Age_band'], y =  df['Premium'], name = 'Premium') ],
    'layout': go.Layout(
        title = 'Age Plot',
        plot_bgcolor = colors['background'],
        paper_bgcolor = colors['background'],
        font = {
            'color': colors['text']  })

Hi there. Can you be more clear about the error you’re receiving, or make a sample app showing the error you’re receiving so that others can test it out?

It looks like you have a separate value called 'All' in your dropdown (assuming it’s a multi), which is meant to signify all countries. A common use pattern I’ve seen is to simply have your list of countries in the dropdown without an ‘All’ value. If you want the default to be all, you can use similar if statements to the ones you have:

if selected_country == []:
    country_list = list(pr_group['Nationality'].unique())
    country_list = country

Hi Sir, I wish to add a select all option for my merchant_id dropdown. I have stored restaurant name in a list df4 and merchant_id in list df2. I’m using for loop for dropdown values. How can I add a select all option in this very dropdown