Google Chart - Timeline (Gantt Chart) does not work with ie8

149 views
Skip to first unread message

ting....@gmail.com

unread,
Sep 6, 2013, 12:04:29 AM9/6/13
to google-visua...@googlegroups.com

I am trying to do a Gnatt Chart in SharePoint using Google Chart.

There is a chart type call "Timeline". I copy and paste the script and it works well in firefox.

However in IE8, the chart did not render. It throws the error below. Please advise!

Script

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['timeline']}]}"></script> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript"> google.setOnLoadCallback(drawChart); function drawChart() { var container = document.getElementById('example1'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable(); dataTable.addColumn({ type: 'string', id: 'President' }); dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addRows([ [ 'Washington', new Date(1789, 3, 29), new Date(1797, 2, 3) ], [ 'Adams', new Date(1797, 2, 3), new Date(1801, 2, 3) ], [ 'Jefferson', new Date(1801, 2, 3), new Date(1809, 2, 3) ]]); chart.draw(dataTable); } </script> <div id="example1" style="width: 900px; height: 180px;"></div> </head> </html>

Link to Script

I've posted similar question in stackoverflow.
Message has been deleted

ting....@gmail.com

unread,
Sep 6, 2013, 12:08:44 AM9/6/13
to google-visua...@googlegroups.com
The inserted picture of error message did not show.
I'll insert the error message instead.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E; MS-RTC LM 8)
Timestamp: Thu, 5 Sep 2013 07:49:54 UTC

Message: Script error
Line: 0
Char: 0
Code: 0
URI: https://www.google.com/uds/api/visualization/1.0/4086f2e8fc632adc52e6d6795a5637a4/dygraph,format+en,default,timeline.I.js


Message: Object expected
Line: 730
Char: 3
Code: 0
Reply all
Reply to author
Forward
0 new messages