☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

How to use datetime slider to slide in terms of fixed time frames

Community Supportserver
_jm
_jm

@reddihari

The DateRangeSlider is probably the best premade widget given your requirements. See its description here https://docs.bokeh.org/en/latest/docs/reference/models/widgets.sliders.html.

Its value property is a tuple of (Datetime, Datetime), where the first element would correspond to Time P and the second element would correspond to Time Q in your drawing.

These values are independently moveable, so if you want them to do something different like constrained to move together when dragging the lefthand side and stretch/shrink when dragging the righthand side, you would have to make that happen in your callbacks, I believe.

Regarding a play button, its a matter of writing the logic in your callbacks to simply make the button stream data to the plot. If you want to make it move the sliders, I think that should also just be a matter of writing the callbacks and interactions do what you want.

⌁   Link to post

End of archived discussion · Replies are disabled