Getting 1M, 6M, YTD, etc. date ranges on a chart

I am trying to get date ranges like in the following graph:

I posted this on SO with more details.

Hi @srinath there are lots of examples of buttons and other widgets alongside Bokeh plots, either with JS callbacks or with real Python callbacks (in a Bokeh server application), in the documentation and in the examples directory in the repo. What have you looked at and tried to emulate already, and where did you get stuck? The code on SO does not appear to make any attempt to add buttons at all. Generally speaking, the best way to utilize this site (or SO) is to try something upfront and then ask about specific problems with the code you have in hand.

Thanks for the pointer. I am new to Bokeh. I will give this a try and get back if there are issues.

1 Like