var img = new Image();
img.src = myChart.getDataURL({
type:"png",
pixelRatio: 2,
backgroundColor: '#fff'
});
downloadWeibo(img,"微博平台-事件传播脉络",myChart.getWidth(),myChart.getHeight());
==============================================================
var downloadWeibo=function(img,name,width,height){
console.log(img)
img.οnlοad=function(){
var canvas=document.createElement("canvas");
console.log($(img).width());
console.log($(img).height());
canvas.width=width*2;
canvas.height=height*2;
var ctx=canvas.getContext('2d');
ctx.drawImage(img,0,0);
canvas.toBlob(function(blob) {
saveAs(
blob
, name+".png"
);
}, "image/png");
}
}