From 25c2433d91c86b79fe8134e27ccb7f2140a63339 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 22 Mar 2011 00:17:21 -0400 Subject: [PATCH] update IE documentation on home page --- docs/index.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/index.html b/docs/index.html index b21c5c2..2a14b3c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -361,21 +361,26 @@

The dygraphs library relies heavily on the HTML5 <canvas> tag, which Microsoft Internet Explorer did not traditionally support. To use Microsoft's native canvas implementation in IE9, you need to set an HTML5 doctype on your page:

-
-      <!DOCTYPE html> 
-      
+
+<!DOCTYPE html>
+

When IE9 is in HTML5 mode, dygraphs works just like in other modern browsers.

-

If you want to support previous versions of Internet Explorer (IE6–IE8), you'll need to include the excanvas library, which emulates the <canvas> tag using VML. You can add excanvas by including this snippet:

+

If you want to support previous versions of Internet Explorer (IE6–IE8), you'll need to include the excanvas library, which emulates the <canvas> tag using VML. You can add excanvas by including the following snippet:

-<head>
-  <!--[if IE]><script src="excanvas.js"></script><![endif]-->
-</head>
+<!DOCTYPE html> 
+<html>
+  <head>
+    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> 
+    <!--[if IE]><script src="path/to/excanvas.js"></script><![endif]-->
+  </head>
 
-

While this sounds like it would be slow, it works well in practice for most charts.

+

(This is surprisingly tricky because the HTML5 doctype breaks excanvas in IE8. See this discussion for details.)

+ +

While VML emulation sounds like it would be slow, it works well in practice for most charts.

One common gotcha to look out for: make sure you don't have any trailing commas in parameter lists, e.g.

-- 2.7.4