I'm using html2canvas to convert a div
containing graph ( graphs are being generated by plotly.js ) to image, so it can be downloaded. But the graph is getting blurred in the image.
This my code :
html2canvas([document.getElementById('graph_div')], {
onrendered: function (canvas) {
var data = canvas.toDataURL('image/png');
location.href = data;
}
});
I've seen this and this and these images are rendering just fine so I don't think this might be a retina display issue as explained here
This is the actual div ( grey color is because of an overlaying div ) :
And this is the image html2canvas is generating :
Can you guys please tell me what am I doing wrong ?