You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Failed - network error" when downloading large png using toImage button #3771
I haven't yet found the actual limiting condition, but after some threshold of plot width/height/number of data points, I am unable to download a png of a Plotly plot. See following codepen:
I manually tested saving mock 14.json to image by clicking the snapshot button in the modebar. I used a bundle built off your branch createObjectUrl which is currently at b31fef6
IE11: works
Safari 12 on macOS Mojave: it goes to the following page instead of saving to file:
IE10: cannot even render the figure even when uncommenting
Activity
etpinard commentedon Apr 24, 2019
Thanks for reporting!
Interestingly, downloading your graph in FF66 works fine. Chrome must put a URL-length limit in
<a>withdownloadattribute like we use here:plotly.js/src/snapshot/filesaver.js
Lines 45 to 52 in 4529fe9
I found this stackoverflow post claiming that Chrome uses a 2MB limit.
We should probably try using
URL.createObjectURL.Interestingly, we were using createObjectURL to some extent back before #446
[PoC] use URL.createObjectURL to download large images
etpinard commentedon May 29, 2019
PoC in https://github.com/plotly/plotly.js/compare/createObjectURL
We should be able to get a fix in the next minor 1.49.0 (I wouldn't want to try this our in a patch release).
use createObjectURL during Plotly.downloadImage
use createObjectURL during Plotly.downloadImage
etpinard commentedon Jun 25, 2019
https://codepen.io/etpinard/pen/zVdjQg which uses https://42931-45646037-gh.circle-artifacts.com/0/dist/plotly.min.js
appears to work correctly on Chrome 70 and FF67 on my laptop.
Before making a PR, we still need to test the legacy fallbacks on IE10, IE11 and Safari.
antoinerg commentedon Jun 28, 2019
I manually tested saving mock
14.jsonto image by clicking the snapshot button in the modebar. I used a bundle built off your branchcreateObjectUrlwhich is currently at b31fef6plotly.js/devtools/test_dashboard/index.html
Lines 22 to 24 in 3d383b7
etpinard commentedon Jun 28, 2019
Cool. Thanks! Have you tried downloading
14.jsonon Safari and IE10 offmaster?antoinerg commentedon Jun 28, 2019
Taking a snapshot of
14.jsonon Safari works offmaster: it downloads the image to the filesystemantoinerg commentedon Jun 28, 2019
In IE10 I can't load the dashboard and render anything.
use createObjectURL during Plotly.downloadImage
etpinard commentedon Jul 2, 2019
Things seems to now work ok in Safari off ecf3ac7 on browserstack.
Still, before I make a PR, I would appreciate if someone with access to a Mac could test out https://codepen.io/etpinard/pen/QXraeW in Safari.
Thanks!