8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0dded42 commit 127ebc5Copy full SHA for 127ebc5
plotly/offline/offline.py
@@ -61,14 +61,14 @@ def init_notebook_mode():
61
62
global __PLOTLY_OFFLINE_INITIALIZED
63
if not __PLOTLY_OFFLINE_INITIALIZED:
64
- display(HTML('<script type="text/javascript">' +
65
- # ipython's includes `require` as a global, which
66
- # conflicts with plotly.js. so, unrequire it.
67
- 'require=requirejs=define=undefined;' +
68
- '</script>' +
69
- '<script type="text/javascript">' +
+ display(HTML("<script type='text/javascript'>" +
+ "define('plotly', function(require, exports, module) {" +
70
get_plotlyjs() +
71
- '</script>'))
+ "});" +
+ "require(['plotly'], function(Plotly) {" +
+ "window.Plotly = Plotly;" +
+ "</script>"))
72
__PLOTLY_OFFLINE_INITIALIZED = True
73
74
0 commit comments