问题
Is it possible to embed Highcharts scripts in Google sites?
I've tried inserting an HTML box and also throwing everything in an HTML file and calling it via a Google Apps script. So far, both methods just give me all the text from the graph (title, axis labels, etc.), but no graph. I know embedding JS in a Google site is kind of tricky, but can this be done?
回答1:
No. SVG (which Highcharts uses) is not supported within Caja (which an HTML Box and Apps Script use to sanitize and ensure safe code).
回答2:
Yes, as of Jan 2016 (at least), I can easily use a highcharts library in GAS.
A dynamically updating graph using highcharts library within GAS environment can be found here: GAS-highcharts
A Working example is here: working-highcharts-GAS
It is based on this JSFiddle: jsfiddle (dot) net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/stock/demo/dynamic-update/
来源:https://stackoverflow.com/questions/23893840/highcharts-highstock-supported-in-google-sites