HOSTING

Share a Bokeh or Altair chart as a link

Bokeh and Altair both save an interactive chart as one HTML file. Upload the file and send a link that opens the chart, with hover, zoom and selections, in any browser.

4 min read·

A chart built in Python is easy to look at in a notebook and awkward to send to someone who does not run Python. A screenshot loses the tooltips and zoom. An emailed .html attachment often arrives as a download or as raw code on a phone: why HTML files don’t open from email. A hosted link opens the chart directly. For Plotly charts and whole notebooks, see sharing a Jupyter notebook or Plotly chart.

Save a Bokeh chart as HTML

  • ✓Call output_file("chart.html"), then save(p) on the figure or layout. show(p) also writes the file and opens it.
  • ✓By default the file loads the BokehJS library from Bokeh’s CDN, so it is small but needs an internet connection to display.
  • ✓To put the library inside the file, pass resources=INLINE (from bokeh.resources) to save(). The file gets larger and works offline.

Save an Altair chart as HTML

  • ✓Call chart.save("chart.html").
  • ✓The file loads Vega, Vega-Lite and vega-embed from a public CDN, so it needs an internet connection to display.
  • ✓Tooltips, selections, linked brushing and .interactive() pan and zoom run in the browser and keep working once hosted.

What works in a static file

Anything that runs in the browser works: hover tools, zoom, pan, legends that hide series, Altair selections, and Bokeh widgets wired up with CustomJS callbacks.

Python callbacks do not. A Bokeh app started with bokeh serve, or a chart that recalculates in Python when a slider moves, needs a running Python server. Those apps need a server host; a single-file link serves the page only.

Upload it and send the link

Drag the .html file onto the FileShare Pro dashboard and copy the link. The chart is served as a web page, so it behaves the same as when you open the file locally. The free plan accepts files up to 100 MB, which covers a chart with its library and a sizeable dataset embedded.

Viewers need no account and nothing to install. Shared pages carry a noindex tag, so a chart of internal numbers does not appear in search results. On Pro you can add a password: password-protecting an HTML page.

Update the chart without a new link

When the data changes, save the chart again and upload the new file over the old one. The link stays the same and the previous version is kept in history: updating a shared link without changing it.

Turn on comments and readers can leave a note on the page after typing a name, such as a point that looks wrong or a series they want added. The view count shows whether the person you sent it to has opened it.

Frequently asked

How do I share a Bokeh plot with someone who does not use Python?

Save it with output_file and save(), upload the HTML file to a host that serves it as a web page, and send the link. It opens in any browser.

How do I share an Altair chart?

Call chart.save("chart.html"), upload the file, and send the link. Tooltips, selections and zoom keep working.

Why do my Bokeh sliders do nothing after uploading?

They are probably wired to Python callbacks, which need a running Bokeh server. CustomJS callbacks run in the browser and work in a static file.

Does the chart work offline?

Bokeh charts saved with resources=INLINE do. By default, Bokeh and Altair files load their JavaScript from a CDN and need an internet connection.

Is it free?

Yes. The free plan hosts up to 50 files of up to 100 MB each, with view counts and comments included. Password-protected links are on Pro.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free