google / google-visualization-issues

288 stars 35 forks source link

Bug: Visualisation in IE7 & 8 halts on error: "Object doesn't support property or method" #909

Open orwant opened 9 years ago

orwant commented 9 years ago
page: http://davinci.castle-v.com/2011/ (see bar chart icon @ bottom of the page )
script: http://davinci.castle-v.com/2011/scripts/functions.js (first bunch of functions/code)

Object: BarChart / PieChart
Linux Debian test server, external load in
Supported JavaScript library: Jquery
Not using test library
OS: Windows 7
Browser: IE9 forcing browsermode :IE8/IE7 / document defaults in IE7/IE8 standards.

In all other browsers, including IE9, the charts work fine. In Internet Explorer 7
and 8 do not work. It keeps hanging on these two lines: 

1. "visualization = new google.visualization.BarChart(document.getElementById(goContainer));"
(error: "Object doesn't support property or method")
2. "visualization.draw(data[value], options);"
(error: "Object doesn't support property or method 'draw'")

I understand that the object "visualization" doesn't initialize, and IE7 and IE8 have
no native Canvas element support. 

So I installed the excanvas.js. Adding the supporting code does not help. I notice
that the example code works, but the problem is that I am creating the charts dynamically.
 So the issue still is there. Also forcing the browser in IE7 mode with the meta support
tag will not work properly. 
The Doctype was usually set in XHTML strict 1.0, but now put it doctype html for html5
support.

On the page is bar chart icon, if you click it on IE7/IE8, it is not working. 

Shortly how the code works is:

1. load libraries
2. on jquery window load, remove all links and create onClick events, passing the id-name
of a specific DIV element to parse the chart in
3. On click, the function will load a JSON object where the type of data/google doc
data back,..whereas the other function load and draw the visualization. 

The issue in short: IE7/IE8 do not dynamically load the charts on demand.

Original issue reported on code.google.com by jordyhoutman on 2012-05-28 13:49:06

orwant commented 9 years ago
Hi,
- Google Visualization API doesn't use canvas, but SVG (or VML).
- We don't support IE7 any more, but we do try to support IE8.
- Regarding For the problem, I briefly looked at your code, but I couldn't see any
call to setOnLoadCallback (see https://developers.google.com/chart/interactive/docs/basic_load_libs
and read all the way to the bottom). If that doesn't help, please provide a simple
example page that demonstrates the problem.

Original issue reported on code.google.com by jinji.viz on 2012-05-30 12:12:26