0
votes

I have created a UI web app in google apps script which access a database in a spreadsheet, manipulates the data and then puts it into a chart. Now my problem is that I get get the chart to be displayed back into the Ui. I don't even know if that is a possibility, but something along those lines. This is what i have tried thus far:

  • First I created a chart in the doGet function and then tried to access and edit after i took in some info from the user. The problem was that when i .build() the chart it become a generic object and cannot be edited.

    Second I tried to .add the chart to the Ui after taking in info, but i could not get the ui to update. again i don't know the right way to do this.

Let me know if you need any additional info.

2

2 Answers

0
votes

Here's a great recent blog post from Google on coding up dashboards in Apps Script complete with a new charts dashboard tutorial on the developer site. It strikes me that it may be suitable for you as it lets you prepare the data but then you can allow the user to interact with the UI via the chart controls and you don't have to wire up so much in "native" uiApp yourself.

Let us know how you go.

0
votes

You have to recreate your chart completely, i.e. every time your spreadsheet is changed (for instance new row is inserted), you have to take data from it, build a new chart, delete old one and place the new chart instead of the deleted one.