I have a changing data set (network graph) that is created in my code, and have tried to display it with live updating using dash. The data comes down to a custom network object, which I can create a figure from and display it using dash. Another maybe important note is i run the app.run_server() on a separate processes so my code can continue running.
The problem is I cant find a way to get the live updated network object in the dash app.callback that updates the graph's figure. I figured out that the object (attribute) does in fact update but isn't updated inside of the callback
def create_update_func(net):
@app.callback(Output('graph', 'figure'),
[Input('interval-component', 'n_intervals')])
def update_fig(n):
return create_fig(net)
net is the object in question and this is the only way i managed to think of to even get it in the callback. So Tl;Dr how do i get the net object in the callback to live update based on my code?