Bookmark and share:
Bookmark with delicious tweet this site

RGraph: HTML5 canvas graph library - Microsoft Internet Explorer (MSIE) support

Microsoft Internet Explorer 9

Starting from preview 3, Internet Explorer 9 has support for canvas, including the text and shadow APIs. It also benefits from hardware acceleration, and quick rendering times. You can see some screenshots here.


[No canvas support]

Introduction

As of December 2009 RGraph now works partially with Internet Explorer without Google Chrome Frame. Graphs are rendered as VML. You are still recommended to use Google Chrome Frame to get the best results. The interactive features are unlikely to work correctly. RGraph only works with Microsoft Internet Explorer 8.

Thanks go to everyone involved with the ExCanvas project for providing the ExCanvas library.

Getting hold of ExCanvas

Google ExCanvas is distributed with RGraph in the "excanvas" directory. There is a minified gzip compressed version, along with the original.

Caveats

Google Chrome Frame

Instead of ExCanvas you can also use Google Chrome Frame. This basically turns Internet Explorer into Google Chrome, and fully supports RGraph. Since it involves a plugin installation, this is a better option if you can fully influence the users PC. If you can fully influence the users PC however, a better option might be to simply use one of the browsers with native support.


Using a dynamically created canvas

If you're creating your canvas dynamically there is an extra step that you must perform to allow it to be recognised by ExCanvas:

var canvas = document.createElement('CANVAS');
    canvas.id = 'cvs';
    canvas.width = 600;
    canvas.height = 250;
    canvas.style.border = '1px dashed black';
document.body.appendChild(canvas);

G_vmlCanvasManager.initElement(canvas);