Error Creating a Chart in Google Sheets

32 views
Skip to first unread message

David Meyers

unread,
Jul 1, 2020, 9:26:23 PM7/1/20
to Google Apps Script Community
Hello,

I keep getting an error message when trying to add rows to a column chart in Google Sheets. I've tried different syntax (with brackets, without, data in an array, individual entries, etc) and nothing seems to work. I've attached a screen shot of what I think is the proper syntax based on the documentation (again, I've tried formatting it differently and get the same error). Any ideas as to what I might be missing? Thanks in advance!


Clark Lind

unread,
Jul 2, 2020, 5:53:55 PM7/2/20
to Google Apps Script Community
Looks like you should be able to swap out the literal definition in your addColumn calls to a simple string:
data.addColumn('number', '5.8');

And if that doesn't solve it, the dash behind the first value 5.8- may be causing the error.

David Meyers

unread,
Jul 5, 2020, 7:45:13 PM7/5/20
to Google Apps Script Community
Taking out the dash solved it, thank you!
Reply all
Reply to author
Forward
0 new messages