gwatts / jquery.sparkline

A plugin for the jQuery javascript library to generate small sparkline charts directly in the browser
http://omnipotent.net/jquery.sparkline/
1.24k stars 278 forks source link

Sparkline not working on IE #129

Open nhathaway opened 9 years ago

nhathaway commented 9 years ago

The mini graphs to not show up on MS Internet explorer (or Windows phone) using JQuery 2.1.1 and JQuery mobile 1.4.3

A demo of this happening is here: http://87.106.50.71/nhspeed/

(Working OK on Chrome and Firefox, but not IE. Graphs are just below the upload/download speed values during/after the test)

nhathaway commented 9 years ago

OK, so we need (as used by the JQuery mobile demo pages)

<!DOCTYPE html>

not

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

I notice the demo site uses:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

And the FAQ says use:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

I think what I have calls up "Quirks mode" (default for new pages on Aptana Studio), and my guess is that the FAQ is effectively saying that this prevents it from working in IE. Am I correct?

Maybe that item in the FAQ needs expanding/updating.