Thoughts About Google Charts

Created by Phil Thompson

At work we have a series of screens that monitor various different bits of analytical data about our web servers. When I started at the company I was tasked with rewriting the code that powers these information screens.

One of the key features on these screens is a series of graphs that each show different metrics (CPU load, page load times etc. etc.). Now we use an external service to gather and monitor the data from the servers. This third party company do supply a very basic system to embed graphs.

The graphs that they supply are ok they work but they don’t look very nice, also as they are loaded in an <iframe> and you have no way of changing the css or the styling of the graph at all.

So what to do???

After doing a bit of head scratching and playing around with code I found a way of accessing all the metric data that I want via the API that is supplied by the third party service, Hurrah but what to do with it now?

That is when we thought of using the Google Charts system.

Google charts is a free to use JavaScript based system that allows you to process virtually any data you want in to a variety of different charts, graphs, data visualisation maps and widgets.

Now all of your data has to be provided in the form of a json array which can either be really easy to sort out or in our case was very hard because of the way that the metric data was coming to us but after playing with many different foreach loops in PHP we got the data in the right layout for our set of charts.

With Google charts you can get yourself a really nice looking chart up and running in only a couple of minuets and highly customisable by playing with some of the setting which you do by adding options in the relevant area of the JavaScript.

Google charts is really well supported by the comprehensive and relatively easy to understand documentation.


Well I believe that the best way to go through this is to list the pros and cons of this service to help you decide weather to use it yourself, so here goes.



Should you use it???

In my opinion YES certainly, I mean who really wants to write their own chart system or have the time to write there own chart system, I know that I don’t. So save yourself time and effort and use Google charts.

comments powered by Disqus