4
votes

Is it possible to link to high level bokeh timeseries on panning ? the documentation http://docs.bokeh.org/en/0.11.1/docs/user_guide/interaction.html only speaks about low-level plot. I didn't find any info on the net about higher level charts. I tried to share xranges on TimeSeries:

x_range = ew_kpi.x_range, 
y_range = ew_kpi.y_range

and the plot are displayed, but not linked :

x      = 'Date'
y      ='ew_kpi'
ew_kpi = TimeSeries(   pd.DataFrame(data2)[[x, y]]              ,
                        x       =   x          ,
                        y       =   [y]      ,
                        color   =   [y]       ,
                        dash    =   [y]      ,
                        title   =   y        ,
                        ylabel  =   y        ,                        
                        width   = 250        , 
                        height  = 250        )

y      = 'ca'
fig_ca = TimeSeries(   pd.DataFrame(data2)[[x, y]]              ,
                        x       =   x          ,
                        y       =   [y]      ,
                        color   =   [y]       ,
                        dash    =   [y]      ,
                        title   =   y        ,
                        ylabel  =   y        ,
                        width   = 250        , 
                        height  = 250        ,
                        x_range = ew_kpi.x_range, 
                        y_range = ew_kpi.y_range,)

p = vplot(ew_kpi, fig_ca)
show(p)
1

1 Answers

0
votes

Although my bokeh plots are embedded and served in a Django app, I believe I have stumbled on a solution to this. Instead of specifying x_range and y_range inside the TimeSeries constructor, put these lines after the two TimeSeries objects have been created:

fig_ca.x_range = ew_kpi.x_range
fig_ca.y_range = ew_kpi.y_range

and you should find them linked together. In my case I only linked the x_range.