flot uses the <canvas> tag which is a new HTML5 feature. HTML5 isn't fully
described yet (I believe) - certainly Firefox implemented <canvas> long
before HTML5 has turned into a standard. I believe ie is the only major
modern browser that doesn't support canvas but it does support it's own
graphics standard with similar features. So some wonderful person created
excanvas.js which emulates all of the <canvas> commands for ie. So when
people use flot they usually include a little piece of non-standard html
that checks what version the browser is and if it is IE then it includes
excanvas.js. But now ie9 implements <canvas> just fine so that little line
of javascript needs to get slightly more complicated so that excanvas is
only included for ie8 and lower.
Since ie9 is still in beta there is yet time for everyone to update all
their web pages that use flot.
Here is the line of code in question that should be in any web page that
uses flot:
<!--[if IE]><script language="javascript" type="text/javascript"
src="../excanvas.min.js"></script><![endif]-->
One can detect the browser in javascript like this:
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("msie") != -1) alert( 'Internet Explorer');
But you can't normally conditionally include a js file. So an alternate fix
is for excanvas.js to detect the browser type and see if it is ie9. I
suspect the latest version of excanvas already does this so if you use the
bleeding edge version of excanvas your ie9 problems will probably go away.
The alternative is to use more advanced conditional comments:
warning untested code written by someone who has never used "conditional
comments":
<!--[if IE]><!--[if IE lte 8]><script language="javascript"
type="text/javascript"
src="../excanvas.min.js"></script><![endif]--><![endif]-->
More on conditional comments which seems to be a feature that only works in
IE (which is fine for our purposes):
http://www.javascriptkit.com/howto/cc2.shtml
- George Roberts
http://gr5.org
Not necessarily significant but the page contains invalid html, see
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.overfussing.dk%2Fflot%2Fexamples%2Fbasic.html&charset=%28detect+automatically%29&doctype=Inline&group=0
Colin