js bokeh plots in documentation

Hi,

When I generate htmlhelp documentation, resulting chm file shows pretty useless as I get several popup dialogs for unsupported js functions, linked as bokeh plots, on every page there is a plot.

Choosing qthelp, also generates js bokeh plots, while qthelp does not seem to try to render these.

I would expect similar behavior with devhelp.

Also js bokeh plots are generated for epub.

So I was thinking about trying to output png from bokeh plot for use in help file, which I’ll then link to open bokeh js html in browser. But it seems that there is actually no such function exposed for rendering image, but just a save button to manually output bokeh plots.

Any thoughts on this?

Bokeh does not currently support headless (programmatic) generation of images. The primary motivation for creating Bokeh was to enable interactive visualizations inside browsers. There is a long standing open feature request to add static image generation:

  https://github.com/bokeh/bokeh/issues/538

Static image support is certainly something we would like to add, however as you can see from the extensive discussion there, it is a decidedly non-trivial task, and there are many other competing priorities, and limited resources. Because of the intrinsic JavaScript dependence, the only reasonable configuration for building the documentation is "make html". This could probably be made more explicit, and I have created an issue to do just that:

  https://github.com/bokeh/bokeh/issues/4485

It's possible once there are static images that other docs build targets could become supported, but I expect it would take a motivated new contributor to make that happen. The docs build is large and complicated and updating it would be a real effort. The project needs are completely satisfied by HTML docs, so it is unlikely that adding other targets that have narrow usage could ever become a high priority for our very limited resources.

Thanks,

Bryan

···

On Jun 12, 2016, at 6:08 PM, klo <[email protected]com> wrote:

Hi,

When I generate htmlhelp documentation, resulting chm file shows pretty useless as I get several popup dialogs for unsupported js functions, linked as bokeh plots, on every page there is a plot.

Choosing qthelp, also generates js bokeh plots, while qthelp does not seem to try to render these.

I would expect similar behavior with devhelp.

Also js bokeh plots are generated for epub.

So I was thinking about trying to output png from bokeh plot for use in help file, which I'll then link to open bokeh js html in browser. But it seems that there is actually no such function exposed for rendering image, but just a save button to manually output bokeh plots.

Any thoughts on this?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2f21e151-39dd-45c5-9bae-7497dc285640%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks for the explanation, Bryan.

In the meantime I tried wkhtmltoimage (from wkhtmltopdf) but couldnt make it wait for bokeh with any available switch.

Then I tried phantomjs, edited resterize.js to wait for 2000ms and finally I got the image.

Maybe bokeh-plot directive can be extended, and maybe it’s not worth the effort, but I’ll try in next couple of days and report back if I succeed in automating doc generation for narrow used formats :wink:

Cheers

···

On Monday, June 13, 2016 at 1:21:36 AM UTC+2, Bryan Van de ven wrote:

Bokeh does not currently support headless (programmatic) generation of images. The primary motivation for creating Bokeh was to enable interactive visualizations inside browsers. There is a long standing open feature request to add static image generation:

    [https://github.com/bokeh/bokeh/issues/538](https://github.com/bokeh/bokeh/issues/538)

Static image support is certainly something we would like to add, however as you can see from the extensive discussion there, it is a decidedly non-trivial task, and there are many other competing priorities, and limited resources. Because of the intrinsic JavaScript dependence, the only reasonable configuration for building the documentation is “make html”. This could probably be made more explicit, and I have created an issue to do just that:

    [https://github.com/bokeh/bokeh/issues/4485](https://github.com/bokeh/bokeh/issues/4485)

It’s possible once there are static images that other docs build targets could become supported, but I expect it would take a motivated new contributor to make that happen. The docs build is large and complicated and updating it would be a real effort. The project needs are completely satisfied by HTML docs, so it is unlikely that adding other targets that have narrow usage could ever become a high priority for our very limited resources.

Thanks,

Bryan