Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Looking for help with multiple outputs

$
0
0

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?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles