While the default tools provide a minor level of interactivity there’s so much more that can be done. Take a look at some of the Yahoo Finance charts.
Panning is a simple left–right (forward / back) shift of the time series along the horizontal axis (date). When the user pans, the y-axis (price) scales to fit the minimum and max values.
Hi sorry for the tardy response. We are actually in the process of improving this, so some of what I mention here will change in the near future, but but this is how you can do it in Bokeh 0.4.4:
Forst let's look at plot.renderers:
[<bokeh.objects.LinearAxis at 0x107d55c90>,
<bokeh.objects.Grid at 0x107d5ffd0>,
<bokeh.objects.LinearAxis at 0x107d5ff10>,
<bokeh.objects.Grid at 0x107d55d10>,
<bokeh.objects.BoxSelectionOverlay at 0x107d5e090>,
<bokeh.objects.BoxSelectionOverlay at 0x107d5e1d0>,
<bokeh.objects.Glyph at 0x1079d1c10>]
We need to get ahold of the Glyph, in this case it is :
glyph = plot.renderers[-1]
Then we need to get ahold of the data source for this glyph:
ds = glyph.data_source
Do a pull to sync with the server:
ds.pull()
Finally the selected indices are on the selected attr:
ds.selected
This will become quite a bit simpler in the near future, I will update the mailing list when some of the changes get pushed to master.
Panning is a simple left--right (forward / back) shift of the time series along the horizontal axis (date). When the user pans, the y-axis (price) scales to fit the minimum and max values.