Black Lives Matter. Please consider donating to Black Girls Code today.

Sliding line on graph

Hello guys,
I was wondering if it would be possible to slide the line up or down on the graph based on a passed parameter.

is probably a good place to start.

Thanks for the reply.
I still have two problems though.
I would like to move the entire line of my graph up or down. Can this be done without changing the values used for the plot?

Since I’m streaming data constantly, the graph get constantly updated. One option I’m setting on the page is to stop the data stream. I’have successfully implemented this functionality however, if I pause the stream and zoom in on the graph, then when I press the “run again” button the graph does not plot anymore. It remains blank.

I have tried different options, such as using: new plot, redraw, relayout etc… but unfortunately without any luck so far.
The problem does not appear if I don’t touch the zoom.

Any idea?
Thanks in advance.

Would you mind sharing a reproducible example to help us debug?