Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Google Gauges work properly in IE?

EDIT 2

Does anyone understand the latest post of how he got it working:

"i used https instead of http inside script tag.It worked."
-Comment 22 by [email protected], Feb 07 (3 days ago)

Which tag is he referring to? Is that where you load the javascript from google? (I tried an https there, no luck.) Other methods don't seem to work...


I have the Google gauges working in Firefox:
http://code.google.com/apis/visualization/documentation/gallery/gauge.html

But will not work in IE 8.

I also noticed that the "Google Playground" in IE comes up with a pop-up to install Chrome:
http://code.google.com/apis/ajax/playground/?type=visualization#gauge

I saw this post but not a real solution:
http://code.google.com/p/google-visualization-api-issues/issues/detail?id=5

First, what exactly is the issue?

I'm looking for a deeper understanding of why it doesn't work.

Next, any ideas on what to do?

Thanks!

EDIT

Bounty started for 100 pts. Looking for the "best" (as voted by other users) answer to get the guages working in IE, by the end of 7 days

like image 711
Greg McNulty Avatar asked Nov 29 '10 05:11

Greg McNulty


1 Answers

It appears that additional information is available in the comments of the link you've provided:

Found that google is using comment on top of the doctype. This causes doctype declaration not working properly. And thus makes the gauge drawn.

<!--
  copyright (c) 2009 Google inc.

  You are free to copy and use this sample.
  License can be found here: http://code.google.com/apis/ajaxsearch/faq/#license
-->

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

P/S: This is not the workaround.

Comment 6 provides a pseudo-workaround:

Are there any plans on getting this bug fixed for IE8? Removing the doctype from the page will get the gauge to work in IE8, however, this will cause rendering problems with other elements shown in the page.

Comment 8 provides a workaround that attempts to force compatibility mode:

Hi, not a solution but a work around that works fur us right now. By adding a HTTP Response header X-UA-Compatible = IE=EmulateIE7

This could be done in IIS or by adding the following section to web.config

<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>

And I would assume the problem itself should otherwise be addressed by Google or handled by the IE team. I'll leave out the discussion of how that might work politically.

Best of luck with your visualization!

like image 159
MrGomez Avatar answered Sep 19 '22 20:09

MrGomez