Best way to autoadjust y axis window?

What’s the best way to add an option to auto-adjust the y axis when panning horizontally? For example, if I have a Scatter series [1,2,3,4,5,6,7] and I’m only viewing points 1,2,3, I want it so that when I horizontally pan / scroll to points 5, 6, 7, the window automatically adjusts to those points rather than me having to manually pan upwards to view those points.

There is nothing built-in for windowed auto-ranging. The best approach is probably to use js_on_change to respond to changes in the x-range. In the callbacks you would compute and the necessary min/max for the y-range based on the current x-range start and end and the actual data in ColumnDataSource objects for the relevant glyphs.