Skip to content

Instantly share code, notes, and snippets.

@matteoferla
Last active June 28, 2019 22:34
Show Gist options
  • Save matteoferla/029ed72f0c1eee482f91b1fa19efcf94 to your computer and use it in GitHub Desktop.
Save matteoferla/029ed72f0c1eee482f91b1fa19efcf94 to your computer and use it in GitHub Desktop.
Allow plotly charts in Jupyter notebook to export to .html
%%javascript
//hack to fix export
require.config({
paths: {
d3: 'https://cdnjs.cloudflare.com/ajax/libs/d3/5.9.2/d3',
jquery: 'https://code.jquery.com/jquery-3.4.1.min',
plotly: 'https://cdn.plot.ly/plotly-latest.min'
},
shim: {
plotly: {
deps: ['d3', 'jquery'],
exports: 'plotly'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment