Hi All,
I’m wondering if you could help me to understand if I can send a dataframe from a filtered Datatable to a separate page to update plots that exist on other pages? I can update a plot (using derived_virtual_row_ids) ok if the plot is on the same page as the Datatable, but I’m having issues updating a plot based on the filtered dataframe (as outputted from the Datatable) if it exists on a separate page to the Datatable. Any help would be appreciated.
page_SP_DP = dbc.Container([
dbc.Row([
dbc.Col(
dcc.Graph(id=‘feature-graphic_S21_DP’))
])
])
@app.callback(
Output(‘feature-graphic_S21_DP’, ‘figure’),
Input(‘datatable-row-ids’, ‘derived_virtual_row_ids’))
def update_graphs(row_ids):
if row_ids is None:
dff = df
# pandas Series works enough like a list for this to be OK
row_ids = df['id']
else:
dff = df.loc[row_ids]
fig = go.Figure()
fig.add_traces([go.Scatter(
x=dff['n30dBPower (dBm)'],
y=dff['LP +17dBm\nEVM max\n 2:1\n(dB)'],
mode='markers')]),
return fig
Thanks!