0

I'm using Google Apps Script HTMLService:

function doGet(request)
{
  var html = HtmlService.createTemplateFromFile('index').evaluate();
  html.setTitle("CBN Producers' Dashboard");
  html.setSandboxMode(HtmlService.SandboxMode.NATIVE);
  return html;
}

When I copy and paste the first example from Google Charts Timeline Visualisation API to a normal HTML file and test it, it works perfectly. However, when I do exactly the same with a blank project with Google Apps Script, I get nothing, not even an error. Does Google Apps Script not support Timeline or something or am I doing something wrong?

Thanks in advance, guys!

Regards, Vishal

1 Answers1

0

Unfortunately, Google Visualization API is not currently supported in GAS. Non of the APIs that use/extend google object are supported (yet) due to sandbox restrictions.

For additional info and possible work-arounds, see this SO answer.

Community
  • 1
  • 1
azawaza
  • 3,065
  • 1
  • 17
  • 20
  • 'Uncaught script error: 'The only valid numeric escape in strict mode is '\0'' in source: 'https://www.google.com/uds/?file=visualization&v=1.1&packages=calendar' at line: 1' 'Uncaught script error: 'undefined is not an object (evaluating 'new google.visualization.DataTable')' in source: 'unknown' at line: 0' – Vishal Pulikottil Oct 03 '14 at 06:38
  • I get the above two errors when testing the code at Caja Playground. The thing is that other charts seem to be working in HtmlService. I'm currently using Table Charts with no problems whatsoever. I know this is a Caja sanitisation issue but I'm hoping there's some workaround or fix for it. – Vishal Pulikottil Oct 03 '14 at 06:40