That works in every browser but IE...
It seems not work when I press the button: Download in IE.
Flotr.addPlugin("download", {
saveImage: function (type, e, f, g) {
var h = this.options.grid,
image;
if (Flotr.isIE && Flotr.isIE < 9) return i = "<html><body>" + this.canvas.firstChild.innerHTML + "</body></html>", window.open().document.write(i);
if (type !== "jpeg" && type !== "png") return;
image = c(type, this.canvas, this.ctx, this.canvasWidth, this.canvasHeight, h && h.backgroundColor || "#ffffff");
if (_.isElement(image) && g) this.download.restoreCanvas(), D.hide(this.canvas), D.hide(this.overlay), D.setStyles({
position: "absolute"
}), D.insert(this.el, image), this.saveImageElement = image;
else return window.open(image.src)
},
restoreCanvas: function () {
a.show(this.canvas);
a.show(this.overlay);
if(this.saveImageElement) this.el.removeChild(this.saveImageElement);
this.saveImageElement = null;
}
})
I notice that Flotr.isIE will return the version of IE, but it will just open a new tab with a blank.
Anyone knows how to fix it or how to save picture in this way.
thanks for replying.