Ankur Agarwal
Ankur Agarwal

Reputation: 24768

How to draw an html table using bokeh?

I am new to bokeh, I search for examples in the documentation but it appears to me there is not in built method for creating tables. I have some data that I want to show in tabular format. I was wondering what is the easiest way to do that using Bokeh?

The reason I want to draw tables using Bokeh is because I am trying to put a table and two bar charts in the same html report. I was hoping to use one library(Bokeh) to do all my drawing because otherwise I will have to generate table using html generator and then add the html for bar chart generated via Bokeh to that. Hope that explains.

Upvotes: 3

Views: 5388

Answers (1)

bigreddot
bigreddot

Reputation: 34568

There's no built-in support to create an HTML table as of Bokeh 0.9.1, however it is very simple to embed Bokeh plots and widgets inside your own custom HTML templates. For instance, the new spectrogram shows a very customized HTML document with Bokeh plots and widgets embedded:

https://www.youtube.com/watch?v=L6p7Cd3uDis

So, I would recommend taking this approach. The documentation for embedding is located here:

http://docs.bokeh.org/en/latest/docs/user_guide/embed.html

Upvotes: 3

Related Questions