hi
I have done a app with data from drag n drop
the problem, comes with the controls, this is an example:
controls:
controls001=dbc.Card(
[
html.Div(
[
id="x-stat",
options=[
{"label": col, "value": col} for col in dff.columns
],
value="x",
),
]
),
},
]
),
],
body=True,
),
and the callback :
@app.callback(
Output("cluster-graph", "figure"),
[
Input("x-stat", "value"),
Input("y-stat", "value"),
Input("intermediate-value",'data'),
],
)
def make_graph(drop1, drop2,cleaned_dff):
if cleaned_dff!=[]:
df = pd.read_json(cleaned_dff, orient='split')
else:
df=dff.copy()
df = df.loc[:,[drop1, drop2]]
dffff=df.dropna()
fig=go.Figure()
return go.Figure(data=data, layout=layout)
dbc.Tab(label=" 2D",tab_id="",,children=[
dbc.Container(
[
html.H1(""),
html.Hr(),
dbc.Row(
[
dbc.Col(controls001, md=4),
dbc.Col(dcc.Graph(id="",config= {'displaylogo': False}), md=8),
],
align="center",
),
html.Hr(),
dbc.Row([
html.P(""),
html.P(""),
]),
How can I load the controls with the drag n drop dropdown of the new db?