I’m using Bokeh ‘0.6.1’ and I’m rendering a chart. I’d like to embed that chart into a HTML page that references the bokeh-server. I can do that with autoload_server()
but that take as Plot object as input, not a Chart object. How can I accomplish this?
Example:
from bokeh.charts import TimeSeries
x = np.linspace(0,100,num=50)
y = np.random.randn(50)
data = OrderedDict({“xy”:np.hstack((x[:,np.newaxis],y[:,np.newaxis]))})
cht = TimeSeries(data,title=“Timeseries Test”,xlabel=“X”,ylabel=“Y”,legend=True,server=“fubar_plot”,notebook=True).show()
from bokeh.plotting import *
from bokeh.embed import autoload_server
from bokeh.session import Session
output_server(“fubar_plot”)
session = cursession()
script = autoload_server(cht, session)
print script
``
That code does not work because cht is a Chart not a Plot.
Just having trouble groking the difference.
Thanks!
-William