Creating dynamic charts using Google docs

I recently posted about how to add a quick form using Google docs. Kasper Sorenson left a comment asking if it was possible to update an image dynamically

Sometime ago, I wanted to create a dynamic chart based on values that were being entered into a database (in this case we used Google Spreadsheets). Basically if I was to export the chart as a static image, it would be outdated after an hour.

The chart created in the spreadsheet can be embedded instead of exported as an image so in principle you could update it. But I thought I would give it a try.

So, here is a form made using Google docs forms.

That drives a spreadsheet that drives an image:

Update: Well, I hope there is an image there but there seems to be this weird thing were you can’t see the image if you aren’t logged in to Google docs. Odd!. It seems you need to be quite specific about how you share the sheet before you then share the image. But you can also add a chart as a gadget and this seems less temperamental. Down side is that this is also a little unpredictable for updating. Not ideal but still, it’s free.

Add your data to the form and refresh the page and you should see the graph change. Okay the page refresh is not ideal but hey, it’s free.

How does it work

Selecting the whole column means you pick up new entries
Selecting the whole column means you pick up new entries

It works by picking the whole of the results columns the graph rather than specific data cells. With very little info in it it looks pretty sparse but as the results come in it will change. So not a perfect result but not bad.

When to use it
It might be useful if you were tracking fuel prices over time. Add the data and map the timestamp against the price. Add a postcode field the form and you could also output it as a map.

4 Replies to “Creating dynamic charts using Google docs”

  1. I used the Googledocs form and tools as part of some research i did earlier in the year – pretty interesting that you can then make it dynamic, hand’t spotted that.

    Be interested to see the graph version and how it displays that image over a period of time.

  2. Yeah. I think they would need tending as by default the data range is the first 100 cells. Easy to change but a bit of weeding would always be needed if it’s open to the public.

Leave a Reply