pythongraphplotlylive

How do I highlight a region x0-x1 on a live python dash/plotly graph?


I'm trying to highlight certain time regions on a live dash/plotly graph being graphed on localhost. Something like this is what I'm looking for.

I've found many sources online about how to do this on a static graph. The graph I'm using is a live graph and does not have a "fig" object as seen in this static example: https://devcoons.com/plotly-conditional-area-highlight/. Basically, it appends new data to the data source dict. I'm wondering if it's possible to add a vrect to a figure when you don't have an explicit figure object. Thanks


Solution

  • Solution: I used

    fig = go.Figure(*dict*)