Skip to content

Instantly share code, notes, and snippets.

@databyjp
Last active April 20, 2020 10:17
Show Gist options
  • Save databyjp/ec6cb4f1e913f503d5f43c236a1a7d39 to your computer and use it in GitHub Desktop.
Save databyjp/ec6cb4f1e913f503d5f43c236a1a7d39 to your computer and use it in GitHub Desktop.
app.layout = html.Div([
html.Div([
dcc.Graph(id='graph_id'),
dcc.Interval(
id='interval_id',
interval=1 * 1000, # in milliseconds
n_intervals=0
)
]),
])
@app.callback(Output('graph_id', 'figure'),
[Input('grapinterval_id', 'n_intervals')])
def update_graph(n):
... # Generate figure
return fig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment