Re: Column Chart doesn't display on IE8

5,049 views
Skip to first unread message

asgallant

unread,
Dec 14, 2012, 3:00:27 PM12/14/12
to google-visua...@googlegroups.com
I made an HTML doc out of that code, and it runs just fine in IE8 for me.

On Friday, December 14, 2012 1:20:04 PM UTC-5, Lin Dou wrote:
I copied the sample code from google's column chart api, and create a test html,

<html>
 
<head>
   
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
   
<script type="text/javascript">
      google
.load("visualization", "1", {packages:["corechart"]});
      google
.setOnLoadCallback(drawChart);
     
function drawChart() {
       
var data = google.visualization.arrayToDataTable([
         
['Year', 'Sales', 'Expenses'],
         
['2004',  1000,      400],
         
['2005',  1170,      460],
         
['2006',  660,       1120],
         
['2007',  1030,      540]
       
]);

       
var options = {
          title
: 'Company Performance',
          hAxis
: {title: 'Year', titleTextStyle: {color: 'red'}}
       
};

       
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
        chart
.draw(data, options);
     
}
   
</script>
 
</head>
 
<body>
   
<div id="chart_div" style="width: 900px; height: 500px;"></div>
 
</body>
</html>


The test html page doesn't display the column chart on IE8 (OS is windows 7), but I can see the chart with this page https://developers.google.com/chart/interactive/docs/gallery/columnchart on IE8

Can someone tell me why.

Thanks

Jérôme

unread,
Dec 16, 2012, 5:15:22 AM12/16/12
to google-visua...@googlegroups.com
no it does not on many computers with IE8 and windows 7 or windows XP

Lin Dou

unread,
Dec 17, 2012, 10:24:15 AM12/17/12
to google-visua...@googlegroups.com
It works on IE 7 and IE 9, but IE 8 shows the blank page.

asgallant

unread,
Dec 17, 2012, 11:05:29 AM12/17/12
to google-visua...@googlegroups.com
Could one of you who has seen the problem post an HTML file that exhibits the problem (attach the file please, don't copy the source code into a post)?  I will download it and take a look.

Lin Dou

unread,
Dec 17, 2012, 11:30:44 AM12/17/12
to google-visua...@googlegroups.com
I attached the test html with the sample code, IE8 standards shows blank.
chart.html

asgallant

unread,
Dec 17, 2012, 1:22:50 PM12/17/12
to google-visua...@googlegroups.com
I opened that in IE 8 and it works just fine for me.  I have no idea why it wouldn't work for any of you.

Lin Dou

unread,
Dec 17, 2012, 2:32:54 PM12/17/12
to google-visua...@googlegroups.com
I am using IE9 with Windows 7, after I use F12 to change document mode to IE8 standards, the chart won't display.

asgallant

unread,
Dec 17, 2012, 6:00:34 PM12/17/12
to google-visua...@googlegroups.com
IE9 in IE8 mode also works for me.

Jay Li

unread,
Dec 17, 2012, 8:30:03 PM12/17/12
to google-visua...@googlegroups.com
Asgallant & Guys, 

Thank in advance for your help.

Here is the source code. (attachment)

I am running on :

IE9. Update Rev 9.0.12
OS. Window 7 Professional, 64 Bit (Service Pack 1) 
Test Chart - Copy.htm

asgallant

unread,
Dec 17, 2012, 11:36:08 PM12/17/12
to google-visua...@googlegroups.com
That code has an errant comma at the end of the data array:

['5.5', 30, 42, 48], // <-- this comma on the last line of your data
IE is errant-comma intolerant, and will throw a fit if you force feed it one.

Jay Li

unread,
Dec 18, 2012, 2:07:57 PM12/18/12
to google-visua...@googlegroups.com
Asgallant, it fixed the problem. thank you!

Stacie DaPonte

unread,
Aug 20, 2013, 3:18:48 PM8/20/13
to google-visua...@googlegroups.com
I am trying to test the Google Charts main page (https://developers.google.com/chart/) for compatibility in IE8, 7 and 6.

We have a Development Server set up that I am accessing using an app called CoRD (sourceforge), as I read on a forum that using the Developer tools in newer version of IE (9+) to impersonate an older version of IE may not render properly. (See that comment by Jeff Meadows here: http://stackoverflow.com/questions/15072215/google-chart-not-rendering-in-ie8).

So I do have native versions of IE6, 7 and 8 all individually running to try and test this. The page is completely broken in IE6 and serves so many errors that IE eventually just crashes and closes. In IE7 & 8 the page at least loads with some errors, and the graph is not displaying at all.

asgallant

unread,
Aug 20, 2013, 6:58:44 PM8/20/13
to google-visua...@googlegroups.com
Try testing an individual chart rather than Google's developer site.  The charts work reasonably well in IE8 and should mostly work in IE7.  I would not count on them working to any degree in IE6.

ANZ

unread,
Oct 12, 2014, 2:01:09 AM10/12/14
to google-visua...@googlegroups.com
@asgallant
Hi, I have been trying for hours and could not find the solution. I wonder how could you manage to make it work on IE8. If you have any links of working google charts on IE8, could you post it here, or post any solutions.
I do not have any errant comma on my code.

Andrew Gallant

unread,
Oct 15, 2014, 8:52:03 PM10/15/14
to google-visua...@googlegroups.com
I have not tested the charts personally in IE8 in a long time, but I do not know of any bugs that prevent them from working.  If you can post code that isn't working in IE8, I'll take a look and see if I can figure out why.
Reply all
Reply to author
Forward
0 new messages