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.

How to embed plotly visualizations without RequireJS

See original GitHub issue

Hey there - I work on a project called Jupyter Book that lets people share collections of notebooks as a static website.

I’m working on a page for interactive visualization libraries, and I am having a hard time getting Plotly to work. I believe that the reason for this is our SSG uses Bootstrap, and RequireJS (needed by the plotly renderer) doesn’t easily work with Bootstrap.

Are there guidelines for displaying interactive plotly graphs in HTML without RequireJS? Or, suggestions for how to get RequreJS to work with Bootstrap that could be added to the docs? Given how common Bootstrap is, perhaps this is something that could benefit others as well (e.g. I know the new pydata-sphinx-theme also uses Bootstrap, so plotly viz won’t work there either)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, Apr 14, 2020

Our whole doc site is built using Jupytext/nbconvert to make HTML fragments that are then stitched together using Jekyll… The nbconvert bit relies on RequireJS and the Jekyll bit is styled with Bootstrap. We use Jekyll because the same CMS contains docs for Javascript and R, and each language’s docs are in some idiomatic format that we needed to glue together somehow 😃

0reactions
choldgrafcommented, Apr 14, 2020

nice, thanks for the explanation 😃 we were using Jekyll in the Jupyter Book project as well, though we’re moving to Sphinx to make it easier for things like references across pages etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create a Plotly Visualization And Embed It On Websites
If you haven't already, install plotly into your environment using !pip install plotly and import plotly using import plotly.express as px . Run ......
Read more >
Interactive html export in Python - Plotly
These HTML files can be opened in any web browser to access the fully interactive figure. import plotly.express as px fig =px.
Read more >
plotly.io package — 5.11.0 documentation
If 'require', Plotly.js is loaded using require.js. This option assumes that require.js is globally available and that it has been globally configured to...
Read more >
plotly.io.to_html — 5.11.0 documentation
This option assumes that require.js is globally available and that it has been globally configured to know how to find Plotly.js as 'plotly'....
Read more >
Embed Your Graphs - Plotly
Learn how to embed interactive Chart Studio graphs in websites, blogs, iframes, Tumblr, and WordPress online using Chart ... No need for manual...
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