需要有关方法setDataTable(table),Charts服务的文档 [英] Need documentation on method setDataTable(table), Charts service
问题描述
在GAS中使用图表服务时,您可以创建不同类型的图表,并且其中大多数都有两种方法setDataTable(...)
将数据推入其中:
When using Charts service in GAS, you can create different type of charts and most of them have two methods setDataTable(...)
to push data in:
method setDataTable(tableBuilder)
method setDataTable(table)
对于第一个,您使用Charts.newDataTable()
创建一个DataTableBuilder
对象.
但是第二个文件对我来说还不够.
For the first one you create a DataTableBuilder
object using Charts.newDataTable()
.
But the second one is not documented enough for me.
有人知道要传送给函数的对象表的规范吗? 在我看来,它可以是数组或映射,但是使用它没有成功.
Does anyone know the specification of the object table to transmit to the function ? It seems to me it can be an array or a map, but I had no success in using it.
谢谢
推荐答案
第二种方法采用DataTable,这只是调用DataTableBuilder.build()的结果.不幸的是,不可能构造一个可以接受的纯JavaScript对象,而您将需要使用DataTableBuilder.
The second method takes in a DataTable, which is just the result of calling DataTableBuilder.build(). Unfortunately it's not possible to construct a pure JavaScript object that it will accept, and you'll need to use the DataTableBuilder.
这篇关于需要有关方法setDataTable(table),Charts服务的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!