如何在 Google 张图表上创建多个图表?

How to create many graphs on chart in Google sheets?

通过=SPARKLINE(myFun())我可以画一张图。但是我需要画10张图。

我尝试在 myFun 多维数组中 return,但我得到:

Error
Function SPARKLINE line parameter 1 range must be a single row, a single column, two rows or two columns.

在 Google 中,我找到了一些示例,说明如何创建多个手动选择范围的图表(例如,请参阅 https://webapps.stackexchange.com/questions/63174/create-a-google-sheets-chart-with-multiple-data-ranges-with-separate-key-columns/63233)。但这不是我的情况。我需要从函数中提取数据。在工作表中,我有需要处理的数据。

由于 SPARKLINE 不支持数组公式(在自动填充的意义上),您需要使用菜单或按钮来创建(setFormulas())多个 =SPARKLINE(MYFUN())超过 10 个单元格的公式。

或者,您可以使用 EmbeddedChart class.

创建完整的图表