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?