Need documentation on method setDataTable(table),

2019-08-02 04:00发布

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)

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.

Thanks,

1条回答
我只想做你的唯一
2楼-- · 2019-08-02 04:25

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.

查看更多
登录 后发表回答