Is it possible to embed bokeh charts with hover tool in PowerPoint? - python

I am going to embed bokeh charts into PowerPoint (Office 365) using Python. The charts must have at least hover tool stating x and y values. I think there are 2 ways of implementation both of which don't give solution to me:
save the charts in html format and embed them in PowerPoint - I don't know if there is a way to save the open html file (not the link) in the PowerPoint.
save the chart in svg format - but the hover tool is missing there.
Please help me to solve this problem.

Related

Include Python / Bokeh plot in PowerPoint presentation preserving data pop-ups

If an EXCEL chart is pasted into a PowerPoint presentation as an EXCEL object, it is possible to hover the mouse over the line and see it's value. My boss likes this feature. I don't like having to do charts in EXCEL.
It is possible to get the same effect with bokeh or plotly, but as far as I am aware, that either relies on a stand-alone html file or a server instance.
Is it possible to paste a bokeh chart into a PowerPoint presentation preserving the feature that when you hover your mouse over a point, the value (and some other information) pops up?
Or is there another python solution that would allow this feature in PowerPoint (ppt is essential) while also allowing plots to be generated via code?
An available option is to create powerpoints with Plotly: https://towardsdatascience.com/embed-interactive-plots-in-your-slides-with-plotly-fde92a5865a and https://evidencen.com/how-to-embed-plotly-graphs-in-powerpoint/
Also it seems this question has been asked before and you can hyperlink the HTML source in the .pptx file: Output of Plotly in PowerPoint
yes. it's a hover tool. here is an example

How to use python-pptx to replace specific categories in the chart

Currently, I am doing repeated work like find and replace some content in PowerPoint. And I find some codes to F&R the text in the text-box or table. However, I cannot F&R those words in the chart that I need to edit in excel. Is there any possible solution? Instead of extracting the data to create a new chart.
Charts in Powerpoint are a little tricky, as they are stored in two places.
You'll need to first edit the "real" chart data by loading the excel behind (in C# this is the EmbeddedData section), and then update the cached values that Powerpoint has. These are descendants of the chartspace. If you don't do this, then you have to click in and out of the slide deck to trick Powerpoint into updating. I'm afraid I don't have python code to do that as I did the same in C#/Dotnet for slidetemplater.com
That does however have a python API too (https://pypi.org/project/slidetemplater/)

Is there a way to insert interactive animations from python plotly to a powerpoint?

I want to insert the plotly interactive animation into a powerpoint. I read online that you can generate a gif, however I want to be able to use the animation bar that you get from plotly on the powerpoint slide. Is there any way to do that? Sorry if this is a stupid question, this is my first time doing something like that.
You can try getting an extension that allows embedding the plotly webpage you have into powerpoint. How well this works will depend on the specifics of the extension you choose to use.
There is some discussion about embedding iframes into powerpoint here: https://answers.microsoft.com/en-us/msoffice/forum/all/how-do-i-embed-iframe-code-into-my-powerpoint/5b7b5bc9-a68b-46d9-88ad-207387d621b7

Doubts about adding matplotlib graphs to a webpage

So, I'm learning how to use matplotlib and stumbled into MPLD3 as the most used way to get these plots in a webpage. However, MPLD3 doesn't support tick formatting and that's something critical for the project I'm in right now. I'd like to know if there is another way to add a matplotlib graph to a webpage while keeping the tick formatting and also having tooltips to display data on hover.
Thanks!
For a web application I would consider bokeh. You can output html with interactive charts or run another backend server. If you go to the ipython notebook tutorial section 10 has demos for embedding.
Alternatively you can just save images from matplotlib and use them as static assets in your page.

Adding hover tool to DataTable widget

using Bokeh 0.12.6 / Python 3.6:
Is there a way to add a hover tool (similar to bokeh.models.HoverTool for plots) on a bokeh.widgets.DataTable widget? It doesn't look like it's an api feature yet, so I'm looking for some guidance on the best way of achieving this?
Perhaps I can tinker with the final HTML document with Bokeh embedded inline and add a HoverTool javascript object associated with the SlickGrid table?

Categories

Resources