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

Error: TypeError: update_figure() takes 1 positional argument but 2 were given

$
0
0

Hi All,
I am running in to the following error while i am providing interval and dropdown both inputs at the callback, can you please help me with, how we I provide both inputs at the call back.

@app.callback(Output(‘plot’, ‘figure’),
[Input(‘update_interval’, ‘n_intervals’),
Input(‘pick-plot’, ‘value’)])

def update_figure(value):
if value == ‘MC’:
fig = {‘data’:data, “layout”:layout}
return fig
elif value == ‘LCU’:
fig = {‘data’:data1, “layout”:layout1}
return fig
elif value == ‘OCC’:
fig = {‘data’:data2, “layout”:layout2}
return fig
else:
fig = {‘data’:data, “layout”:layout}
return fig

Error: TypeError: update_figure() takes 1 positional argument but 2 were given

Thanks & Regards,
Kumar.

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles