9

I have inserted a chart into a Google Doc, but would like to make it update automatically instead of having to manually open the Doc and press the floating update buttons.

So far I have found no way to do this beyond writing a script to replace each one every time - which I have not yet felt strong enough to do.

How can an embedded chart be updated automatically?

CJBS
  • 15,147
  • 6
  • 86
  • 135

3 Answers3

1

I found several answers from this forum you might want to try:

Using XML Gadget for Charting:Steps if you would like to try out;

  1. Go to your google spreadsheet (or googgle form data).
  2. go to Menu>Insert>Gadget
  3. click "chart" & select chart you like & "add to spreadsheet"
  4. key-in all the chart setting required by the Gadget
  5. click "apply & close"
  6. After the chart populated, point your mouse to the left corner of chart, click "gadget"
  7. You'll see "Get Query data source"-item a and "Get XML" - item b
  8. click the item b, example "http://www.google.com/ig/modules/image-bar-chart.xml"
  9. Go to google "site" and "insert" > "more gadget"> "add gadget by url"> paste the item b, http://www.google.com/ig/modules/image-bar-chart.xml
  10. You'll need to provide the data source in the pop-up windows, paste the link of item a and key-in all necessary setting. (refresh interval 1, 5, 30mins- set here)
  11. save & done.

Using ARRAYFORMULA to make sure that the charts would be updated with the new information. Sample is in this site.

I'm not entirely sure if this is useful but since you're doing scripting, you might as well check Read and write data in Firebase from Apps Script.

CJBS
  • 15,147
  • 6
  • 86
  • 135
ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
  • 1
    Thanks - the problem with the gadget method is that it seems Google's timed triggers can be unreliable. I have some Scripts that run on timed triggers and I get an inbox full of failure logs every night. –  Aug 24 '16 at 19:57
1

Google Docs doesn't support the proper way of linking and embedding objects like MS Office does. I haven't seen any real solution as yet.

Sujay Phadke
  • 2,145
  • 1
  • 22
  • 41
0

Found a hint at github:

Yes, that is correct, published charts in Google Sheets only update 5 minutes after a change was made.

Avatar
  • 14,622
  • 9
  • 119
  • 198