plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Download plot as a png not working in IE from 1.13.0

Open fixxxr opened this issue 10 years ago • 10 comments

From release 1.13.0 the snapshot in IE (svg) seems broken. tested with type: 'surface' and type: 'contour' and for the first it produces a blank svg while for the second, the snapshot seems to stop before the saving of the svg file.

From 1.12.0 and below the snapshot for type: 'contour' has the same behavior as described above.

fixxxr avatar Jun 28 '16 10:06 fixxxr

Thanks for the report.

We did make some changes to our to-image code in 1.13.0 (See PR https://github.com/plotly/plotly.js/pull/604).

Can you confirm or infirm the following:

Donwload plot with

  • type: 'surface' does not work in IE11 with plotly.js 1.13.0 ?
  • type: 'surface' works in IE11 with plotly.js 1.12.0 ?
  • type: 'surface' works in IE11 with plotly.js 1.11.0 ?
  • type: 'contour' does not work in IE11 with plotly.js 1.13.0 ?
  • type: 'contour' does not work in IE11 with plotly.js 1.12.0 ?
  • type: 'contour' does not work in IE11 with plotly.js 1.11.0 ?

To-image support for IE11 was introduced in 1.11.0 (see PR https://github.com/plotly/plotly.js/pull/446), so there no chance of it working in versions < 1.11.0.

cc @timelyportfolio

etpinard avatar Jun 28 '16 14:06 etpinard

in order:

  1. Yes
  2. Yes
  3. Yes
  4. Yes
  5. Yes
  6. Yes

Below 1.12.0 is for down to 1.11.0

Thanks

fixxxr avatar Jun 28 '16 14:06 fixxxr

@fixxxr, I'll check. Could you provide the code you are using to make your png, or are you using the snapshot button? Sorry for the troubles.

timelyportfolio avatar Jun 28 '16 16:06 timelyportfolio

I am using the snapshot button. Also I tested the aforementioned releases with the example posted here: plotly.surface, just to be sure that it wasn't related only to my case. I confirm that the issue is reproducible with the code posted on Plotly's page.

fixxxr avatar Jun 29 '16 07:06 fixxxr

Looking into this, and I think I see the issue. I'll keep working on it and hopefully by tomorrow I will have it fixed.

timelyportfolio avatar Jun 30 '16 02:06 timelyportfolio

@timelyportfolio, thank you very much

fixxxr avatar Jun 30 '16 06:06 fixxxr

hi there, any news on this issue?

fixxxr avatar Oct 12 '16 06:10 fixxxr

From @vsabeti :

PNG toImage for IE Edge works if img.crossOrigin is set to 'Anonymous'. The tainted canvas is fixed for the Edge browser (and works with this one change), but apparently will not be fixed for IE11. https://connect.microsoft.com/IE/feedback/details/828416/cavas-todataurl-method-doesnt-work-after-draw-svg-file-to-canvas It would be great if in a future plotlyjs release, toImage png format is allowed for Edge while still restricting IE11 and below to be svg format only.

etpinard avatar Oct 20 '16 14:10 etpinard

@etpinard so does this mean that we cannot use the toImage method in IE 11, but will work in IE Edge for windows 10 with crossOrigin, please let me know if I have understood it correct. Also if toImagemethod is not supported for IE11 then what are the alternatives for the same. As suggested I have tried the toImagemethod with svgformat and it fails to render in IE 11 In my above query #1103 I have added a JSfiddle which makes use of canvas but its working in chrome and Firefox but fails in IE 11.

ravidixit avatar Nov 06 '16 00:11 ravidixit

superseded by #2077 for clarity

alexcjohnson avatar Oct 10 '17 14:10 alexcjohnson