https://jsfiddle.net/Abhi_Solanki/9yktct3z/3/ here fiddle link..
what i am trying to do is to show the same output as the highcharts show when it is exported in PDF format or SVG format, infact in this code i have used the same function that is used to generate SVG file of Highcharts the output of that seems proper to me
but the problem arises when i pass that variable into canvg.js file calling canvg at function that time the output of the image gets blurry
where i want the output to remain same as it is without pixels getting blurred as it is same in the highcharts pdf. as i have to display that image of chart in a pdf file so please help. code is as below.
var svgres = chart.getSVG();
var svgArr = [],
top = 0,
height = 0,
width = 0,
col=0;
svgCustDim = 400;
var svgWidth = 600,
svg = svgres.replace('<svg', '<g transform="translate(' + col * svgWidth + ',' + top + ')" ');
svg = svg.replace('</svg>', '</g>');
svg = '<svg height="' + svgCustDim + '" width="' + svgCustDim*(3)+ '" version="1.1" xmlns="http://www.w3.org/2000/svg">' + svg + '</svg>';
canvg('canvas', svg);
var canvas = document.getElementById('canvas');
return canvas.toDataURL("image/jpeg");
it will be really helpful if there is any solution to this...
Thank you. – Abhishek Solanki Mar 30 '17 at 08:45