Skip to content

Instantly share code, notes, and snippets.

@squidsoup
Created July 8, 2010 21:46
Show Gist options
  • Save squidsoup/468694 to your computer and use it in GitHub Desktop.
Save squidsoup/468694 to your computer and use it in GitHub Desktop.
flot and excanvas issue
//jquery.flot:
canvas = $('<canvas width="' + canvasWidth + '" height="' + canvasHeight + '"></canvas>').appendTo(target).get(0);
if ($.browser.msie) {
// excanvas hack
canvas = window.G_vmlCanvasManager.initElement(canvas);
}
ctx = canvas.getContext("2d");
//IE6 needs the canvas element initialised like this instead
var canvasHTMLDOM = document.createElement("canvas");
jQuery(target).append(canvasHTMLDOM);
if ($.browser.msie) {
// excanvas hack
canvas = window.G_vmlCanvasManager.initElement(canvas);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment