Reputation: 2021
I've been trying to embed bokeh charts in custom templates following this release updates here, examples zip
Now I'm trying out holoview as well and was wondering how I can embed holoview with bokeh renderer to custom templates. I'm not able to give name in holowview charts to achieve this
{{ embed(roots.mychart) }}
Appreciate any help if someone has already tried this out.
Upvotes: 4
Views: 252
Reputation: 2021
In addition to bigreddot's answer if someone wants to know how to get bokeh chart from holoview
renderer = hv.renderer('bokeh')
myb = renderer.get_plot(holoviewplot).state
myb.name = 'mynewchart'
curdoc().add_root(myb)
And then in the template
{{ embed(roots.mynewchart) }}
Upvotes: 1
Reputation: 34568
name
is a Bokeh level property, available on any Bokeh model. You should be able to set:
plot.name = "mychart"
on whatever Bokeh plot is returned by Holoviews.
Upvotes: 3