The provided solution worked half the way for me, but what I need is to represent the data in a graph.
I'm getting the data out of array statically by this code in index.html
:
<? var data = getData(); ?>
<table>
<? for (var i = 0; i < data.length; i++) { ?>
<tr>
<? for (var j = 0; j < data[i].length; j++) { ?>
<td><?= data[i][j] ?></td>
<? } ?>
</tr>
<? } ?>
</table>
And here is the HTML output:
And what I need is a graph: (the values are in array I need a way to take values from array and display a dynamic visual):
I was successfully able to fetch and manipulate the data from API (JSON) to "code.gs". Now I'm looking to push/ pull the "code.gs" array data received from API (JSON) to HTML service charts and make a beautiful dashboards. (Everything is Web App)
How can I get the Dynamic array data from code.gs
to HTML service charts?
Many forums I have been through talk about static data, where they declared a datatable with .addcolumn
and .addrow
.