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.
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
Related
I have recently started learning Python. To automate a report, I'm reading excel data and plotting some graphs using Plotly. But I also want to display a subset of the table data as-is i.e. retaining all the formatting (esp. the formatted colors of the underlying sheet)
I'm able to read the table with the same formating as the table using StylerFrame
sf = StyleFrame.read_excel(s_filename, engine='openpyxl',read_style=True)
but don't know how to add this to the html.
I have tried the workaround where I read the table as a dataframe, style it and render() it to an html. This works.
But I would prefer to show the StylerFrame object on an Html instead. Please help.
I know that there are a bunch of widgets available in Bokeh, here:
https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html
How can I integrate Bokeh Dropdown Menu with MultiSelect (or extend the Dropdown) in order to have a Multi-Select Dropdown? Is there anything built-in?
My expected result is a dropdown which one can select/deselect multiple options.
You can write you own custom Bokeh model extension using TypeScript. See Extending Bokeh for more information. Scroll down for links to some nice examples. You will need to install nodejs on your system to be able to compile TypeScript.
If the widget height is your main consideration than you could think of replacing the MultiSelect with CheckboxButtonGroup.
I need to add a real-time chart to my Flask-SocketIO app, for that i found Plotly.
Would it be possible with Plotly to generate a chart which shows both real-time data and past data? When the user opens the page he should be able to see both the data from before the webpage was opened and the new data. How would it be possible to accomplish that with Plotly? Is there an example for it?
For this kind of apps it's highly recommended to feed your real time data to a database and connect your visualization with said database, however I think it is possible to achieve what you want in jupyter notebook with plotly 3 FigureWidget's batch_update. I can't quite get the idea of what you want without some code though.
I have created a Bokeh Document that currently hosts two plots. The first employs two widgets that control a barchart while the other is a standalone choropleth map. Using the Bokeh server, the plots are completely interactive and dropdown and button widgets are able to dynamically update the source data and sort barchart respectively, but I am trying to share this Document with colleagues that simply want to visualize these data in the same fashion on a web page independent of the Bokeh server.
Is this possible?
Thanks in advance!
My app is in python using the flask framework. I have a chart that I've generated with chartlink. I'd like to include it on a pdf that I'm outputting with pisa. Is this possible? Is there some way to save the chartkick chart as an image? Or should I look into another chart-generating option like pygal or matplotlib?
According to the chartkick documentation you can give users the option to download an image of the chart.
You will have to include canvg before chartkick.js.
Another option would be to generate the image on a PhantomJS instance and save the screenshot/image.