Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes in SaveChartAsImage.js #664

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 8, 2018

  1. fix SaveChartAsImage.js:

    1. devicePixelRatio / backingStorePixelRatio for correct image scaling on Retina devices
    2. use file-saver for correct image saving on IE/Edge/Safari
    3. add canvg parameter for fallback when saving in IE11/Edge (IE has security bug when trying to save canvas with any svg image painted on). See https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/1015651/ or similar bugreports. See description for canvg parameter here: https://github.com/exupero/saveSvgAsPng (canvg - If canvg is passed in, it will be used to write svg to canvas. This will allow support for Internet Explorer)
    4. Add paddings parameter to save functions
    5. Add save-svg-as-png workaround to fix bug with saving on IE11: we want width/height from svg, because Image.width/height returns 0 in IE11. because Image.width/height returns 0 in IE11. Maybe, this bug exits only when we set image.src to svg as dataurl... Anyway, this bug exists, and we need some workaround for it.
    6. Add polyfills to documentation pages (for IE11 compatibility): @babel/polyfill, blueimp-canvas-to-blob, and canvg.
    eaglus authored and Viktor Tiurin committed Oct 8, 2018
    Configuration menu
    Copy the full SHA
    7f7441b View commit details
    Browse the repository at this point in the history