how to embed standalone bokeh graphs into django templates

后端 未结 5 941
半阙折子戏
半阙折子戏 2020-11-28 21:22

I want to display graphs offered by the bokeh library in my web application via django framework but I don\'t want to use the bokeh-server executable because it\'s not the g

5条回答
  •  借酒劲吻你
    2020-11-28 21:47

    You don't need to use bokeh-server to embed bokeh plots. It just means you'll not be using (and probably don't need) the extra features it provides.

    In fact you can embed bokeh plots in many ways like generating standalone html, by generating bokeh standalone components that you can then embed in you django app when rendering templates or with the method we call "autoloading" which makes bokeh return a tag that will replace itself with a Bokeh plot. You'll find better details looking at the documentation.

    Another good source of inspiration is the embed examples you can find in the repository.

提交回复
热议问题