✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Looking for help with multiple outputs

I tried like this but it is not working. I’m using graph_objects to generate 2 graphs using functions “fav_brands()” and "spend_cap() ". How do I return these graphs from callback funtion?

@app.callback([Output(“fav_brands”, “figure”),
Output(“spending_cap”, “figure”)],
[Input(“drop_down_1”, “value”)])

def updateplot(cid):
sample_data = category_count[category_count[“customer_id”] == cid ]
trace,layout = fig_generator(sample_data)
trace1,layout1 = spend_cap(cid)
return {
‘data’: trace,
‘layout’:layout
},{‘data’: trace1,
‘layout’:layout1}

How do I return these graphs from callback funtion?

I dont understand when you put “trace,layout” and “trace1,layout1”, it has no sense, please explain.