我们可以在谷歌脚本HtmlService中使用Google Chart Tools吗? [英] Can we use Google Chart Tools with Google Script HtmlService

查看:176
本文介绍了我们可以在谷歌脚本HtmlService中使用Google Chart Tools吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用HtmlService在谷歌脚本中使用谷歌图表工具。
但我不知道caja是否允许注入脚本来显示图表。
我的第一次测试给了我空白页。



有谁知道这是否至少可能?



我知道Google脚本提供了图表服务,但功能与Google图表工具相比有限。

解决方案

如果您查看Caja部分下的HtmlService文档, https://developers.google.com/apps-script/html_service#Caja 它说包含的库已经过清理,到目前为止只支持JQuery。



由于Chart Tools依赖于Google的jsapi,并且它看起来有一些非常时髦的魔力,所以我敢打赌它现在不会通过Caja消毒。



我想知道是否有某种方法可以使用GAS图表库生成图表(尽管是静态图表)?但它会产生斑点,我不确定如何将它们集成到HtmlService的页面中!!

I would like to use Google Chart Tools in Google Scripts using the HtmlService. But I do not know if caja will allow to inject script to show a chart. My first tests give me blank pages.

Does anyone know if it is at least possible ?

I know Google Script provides 'Charts' service, but the features are limited compared to what allows Google Chart Tools.

Thanks,

解决方案

If you look at the HtmlService documentation under the Caja section, https://developers.google.com/apps-script/html_service#Caja it says that included libraries are sanitized and so far only JQuery is supported.

Since Chart Tools depend on Google's jsapi, and it appears to do some pretty funky magic, I'd bet it won't pass Caja sanitization right now.

I wonder if there's some way to use the GAS Charts library to produce the charts (albeit statics ones)? But it produces blobs and I'm not sure how to integrate those into the HtmlService's page?!

这篇关于我们可以在谷歌脚本HtmlService中使用Google Chart Tools吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆