【发布时间】:2015-12-08 13:11:41
【问题描述】:
This jsfiddle 展示了如何将 Highcharts 图表导出为 png 文件,但没有展示如何指定文件名。
有点像
var image = canvas.toDataURL("image/png")
.replace("image/png", "image/octet-stream");
image.filename = "file.png"; <=== this doesn't work
// Save locally
window.location.href = image;
有什么想法吗?
【问题讨论】:
-
这是发布在 SO stackoverflow.com/questions/21772424/… 中的答案
-
你试过this solution吗?
标签: javascript highcharts