✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

When setting multi to True and accounting for it, I get an empty graph

I am running the dash app on Jupiter. Everything seems to work until I kept multi=True and adjusted my code below but now it shows an empty graph. What could be wrong:

app = JupyterDash('Simple_App')

app.layout = html.Div([
    
    dcc.Dropdown(id="select_company",
                 options=[{"label":x, "value":x} for x in df2.company].append({"label":"Alle option", "value":"Alle option"}),
                 multi=True,
                 value="ABC company",
                 style={'width': "65%"}
                 ),
    
    html.Div(id='output_container', children=[]),

    html.Br(),

    dcc.Graph(
                id='barplot_graph',
                config={
                    'displaylogo': False,
                    "toImageButtonOptions": {"width": None, "height": None}
                },
                figure={}
            )

])


@app.callback(
     [Output(component_id='output_container', component_property='children'),
     Output(component_id='barplot_graph', component_property='figure')],
    [Input(component_id='select_company', component_property='value')]
)
def update_graph(option_slctd):

    container = "Company stats: {}".format(option_slctd)
    
    if "Alle option" in option_slctd:
        df_filter = df2.copy()
    else:
        df_filter = df2[df2["company"].isin(option_slctd)]


    # Plotly Express
    fig = px.bar(df_filter, 
           x="Month", 
           y="Frequency", 
           barmode="group",
           template = "plotly_dark",
           height=500)


    return container, fig

app

Hi @John-A, welcome to the forum! Did you try printing option_slctd and df_filter inside the callback to check that they have the values that you are expecting?

I think my problem was the input and output. Thanks, figured it out