So I have the following Dash application element:
app.layout = html.Table([ html.Tr([ dcc.Dropdown(id='building-dropdown', options=['label': 1, 'value': 1]), dcc.Graph(id='graph') ]) ])
Really simple. The thing is I’m trying to update the graph dynamically through the following callback (using Pandas to create x):
@dash_app.callback( Output('graph', 'figure'), [Input('building-dropdown', 'value')] ) def plotData(values): if values: x = pd.date_range(start='2020-02-01', end='2020-02-07', freq='1H') fig = go.Figure(go.Scatter(x=x, y=[1 + i for i in range(len(x))])) return fig
And the figure won’t show. Don’t know what to do next, if anything
2 posts - 2 participants







