Getting unhelpful "error" message when trying to draw Gantt chart

155 views
Skip to first unread message

mdslup

unread,
Nov 5, 2017, 5:35:08 PM11/5/17
to Google Visualization API
I'm able to create Gantt Charts with the addColumn and addRows methods, but I would really like to pull the data from a spreadsheet instead. Here is the spreadsheet:


Here's a jsfiddle with the code I have: https://jsfiddle.net/14kszyq5/
(I have many debugging alerts set up so just click through them) 

There is nothing helpful in the javascript console to help me solve this. In fact, when I open the "Network" tab in the developer console, it looks like I'm pulling the data in correctly:

0:{v: "testid"}
1:{v: "Test ID"}
2:{v: "Date(2018,0,1)", f: "1/1/2018"}
3:{v: "Date(2018,1,1)", f: "2/1/2018"}
4:{v: 7, f: "7"}
5:{v: 0, f: "0"}
6:{v: "null"}

Still, the result is just a red error box.

There's one other thing that I feel is a clue but can't figure out. Note that there is a javascript alert immediately before and after chart.draw (lines 30-32 in the jsfiddle)  that say "about to draw" and then "drawn". What's weird is that the error doesn't actually show up on the screen until I get the "drawn" alert. 

Any help would be appreciated. Let me know if I can provide more information to help get this solved. 

Ray Thomas

unread,
Nov 5, 2017, 8:13:58 PM11/5/17
to Google Visualization API
Try taking out the "null" in the Google sheet and leaving it blank.


The date columns must also be set to format date

Ray 

Benjamin Hill

unread,
Nov 6, 2017, 12:29:47 PM11/6/17
to Google Visualization API
You are also welcome to use https://github.com/google/ezgantt and the public https://ezgantt.appspot.com

mdslup

unread,
Nov 7, 2017, 2:16:21 PM11/7/17
to Google Visualization API
D'oh! That worked. Thanks Ray.


On Sunday, November 5, 2017 at 5:13:58 PM UTC-8, Ray Thomas wrote:
Reply all
Reply to author
Forward
0 new messages