Duplicate callback outputs


    Output('dropdown_id', 'options'), Output('dropdown_id', 'value'), 
    Input('dropdown_id', 'value'))
def .......

In above callback I was using session_state to get the options as well selected value in same callback.

Using box select : Selecting data from graph and updating it to backend after button press.

Alert message will gone after 3 sec
How can I reload graph with same value selected in dropdown:
I need to update color of selected data history for that purpose refresh is required.

    Output('alert-auto', 'is_open'),Output('dropdown_id', 'value'),
    Input('dropdown_id', 'value'), 

If I do not use Output(‘dropdown_id’, ‘value’) : Then the selected area which I selected using select-box not going.

@surr2025 , unfortunately I do not understand what you intend to do . Could you try to explain in a different way and/or add an MRE?

I was passing data from django view using session state rather than passing it through context…

In dropdown … to get the options, and value (selected dropdown value) I was using below code.

    Output('dropdown_id', 'options'), Output('dropdown_id', 'value'), 
    Input('dropdown_id', 'value'))

def select_dropdown(value, session_state=None):
    # from session_state accesing db to get all the options
    # Store data from session state to dbc.store 
    # Also providing selected value to dropdown .. to load specific dropdown graph. 

Later, on graph I was selecting area using box-select and stored it in memory after button (id = button_click) was pressed. I want to add selected data to database using below function.

But the box-select marker not going from the graph. So, I tried to refresh the page by passing dropdown value to dropdown. How I remove box-select marker once button is presses??
Is there any way to refresh the graph so that box-select marker from graph can be removed

    Output('alert-auto', 'is_open'),
    [Input('button_click','n_clicks'),Input('dropdown_id', 'value'), 
    Input('memory', 'data')]

Hello @surr2025,

Does the double-click functionality of the graph suffice for you?

If so, check here:


My problem statement is something different…

  1. Drop down load the graph. Getting option and values using session as shown in above code.
  2. Select graph data using box-select.
  3. Press button to update selected data to backend.
  4. Refresh the same graph to show selected data in different color.

Issue : Currently not able to refresh the graph using call back. So box-select marker not going from the graph.


In order to refresh a graph via callback, you need to update something about it on the output.

To redo the whole thing, you’d be looking for prop figure. However, you can do data, layout, selectedData, etc.

Assuming these are points you are trying to color, you can do so accessing the data prop of the graph and updating the marker color for the selected points.

When you say, not going from graph. Do you mean that the data is being sent to backend or they aren’t disappearing?