mode to perform dynamic adjustment of y_range during pan based on visible data

It is typical when looking at time series (in particular financial time series), that as one pans left or right, the range of yaxis changes to fit the min/max in the current view + some upper/lower gap. I note that bokeh does not do any adjustment of the yaxis range unless the pan is moved vertically.

I assume this behavior is on the javascript side and hence requires a new mode or widget with this sort of behavior. In short, looking to have a mode of panning that:

  • adjusts the range on the y axis in to contain all visible glyphs in the visible x range

Further, is useful to be able to adjust the x zoom, so that can lengthen or contract the width of the visible window in x units (usually datetime for me).

I know the machinery to adjust the range, pan, etc is there, the question is how to wire this up & create a new panning mode or an alternative plot area?

Thanks

Jonathan