Amcharts downloaded images are blured on windows and linux machine but not on mac

466 Views Asked by At

I am using Amcharts.js for graph generation but i had an issue "Downloaded images are blured only on windows and linux system but not on mac" and also commmunicate with amcharts support team but no response yet.

1

There are 1 best solutions below

2
On

Please try set multiplier to 2. Take a look at this setting at https://github.com/amcharts/export.

this.toJPG({
    multiplier: 2
}).function (data) {
    // Export
});

Please check the updated example here: https://www.amcharts.com/kbase/exporting-multiple-charts-on-the-page-to-a-single-pdf/

What is multiplier?

Let's say your chart is 800 pixels wide and 400 pixels tall. If multiplier is 1, then the image might stretch to cover the display area in PDF. If the PDF is 1000px wide, that means the image is stretching therefore it looks blurry.

If you set multiplier to something bigger, like 2, then that image is created 1600px by 800px. That means it won't need to stretch unless if your PDF is being displayed with more than 1600px.