Hi
I have a dash page that shows a video and several graphs that relate to the video.
I’d like to indicate the video time in the graphs with a vertical line that moves as the video is played / scrubbed.
I know I can get a callback for the current video time using the Dash Player component.
And I can create a vertical line at a given X axis position using Horizontal and vertical lines and rectangles in Python.
But I don’t know how I can (efficiently) synchronize the two. I’ll want to update the location of the vertical line > 10Hz for each graph.
Since the vertical line is a shape (and therefore part of the Graph’s layout
) and not Graph data
, I can’t use the Graph’s extendData
property as a callback output.
Can I somehow update the location of the vertical line without re-drawing the entire graph?
I guess this would also ideally happen in a clientside callback since all the data is available on the client side and I don’t want to be communicating back and forth this frequently.
Any suggestions are welcome, thanks!