question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't export HTML with Plotly backend

See original GitHub issue

When I use Plotly as backend, the exported HTML does not shows the plot correctly. When I click on the exported HTML file, only ''Drawing…" is displayed.

This is the python code I used in Jupyter notebook

import NumPy as np
import pandas as pd
import holoviews as hv
hv.extension('plotly')
df = pd.DataFrame()
df['x'] = np.arange(10)
df['y'] = np.arange(10)
plot = hv.Curve(df, 'x','y')
hv.save(plot, 'plot.html')

This is the source code of the exported HTML

<script type="text/javascript">window.PLOTLYENV=window.PLOTLYENV || {};</script>
<div id="120902428136.loading" style="color: rgb(50,50,50);">Drawing...</div><div id="120902428136" style="height: 600; width: 800;" class="plotly-graph-div"></div><script type="text/javascript">  var plotly = window._Plotly || window.Plotly;plotly.plot("120902428136", [{"legendgroup": "Curve", "line": {"color": "#30a2da", "width": 2}, "mode": "lines", "name": "", "showlegend": false, "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "type": "scatter", "uid": "2d9897e8-f9cb-4d8a-bdc3-fbf018ed4930"}], {"height": 400, "margin": {"b": 50, "l": 50, "pad": 4, "r": 50, "t": 50}, "title": {"text": ""}, "width": 400, "xaxis": {"range": [0.0, 9.0], "title": {"text": "x"}}, "yaxis": {"range": [0.0, 9.0], "title": {"text": "y"}}}, {"showLink": false}).then(function() {
    var elem = document.getElementById("120902428136.loading"); elem.parentNode.removeChild(elem);
})</script>

It seems the data is included in the HTML file but for some reasons it is not shown.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jbednarcommented, Oct 28, 2019

Yes, that should be in the next release. In the meantime, you can install from master using something like pip install git+https://github.com/pyviz/holoviews.git@master#egg=holoviews

0reactions
jbednarcommented, Oct 28, 2019

The latitude and longitude hover is showing value as Longitude: 9.641e+6 , Latitude:2.286e+6 like this format.

That comment doesn’t seem related to this issue…?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't export HTML with Plotly backend · Issue #3683 - GitHub
I accidentally found out some plots can be exported to html using plotly backend. It seems that export works when there is extra...
Read more >
How to save a panel to html with plotly backend?
Hello guys, I'm creating a panel dashboard with plotly graphs and I'm trying to save in html, but the graphs aren't appearing.
Read more >
How to export a plotly dashboard app into a html standalone ...
You cannot have a fully encapsulated dashboard with interactivity in an HTML file alone. You must bring server-side logic to the table.
Read more >
Interactive html export in Python - Plotly
HTML export in Dash¶​​ Dash is the best way to build analytical apps in Python using Plotly figures. To run the app below,...
Read more >
Saving plot to html - General Usage - Julia Discourse
We want to save the contents of the figure in html (it's exactly the same ... with HTML, PlotlyJS.jl or Plotly.jl, or Plots.jl...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found