Sida 3

Charts with PHP and Google Charts API

13 apr 2008

Just yesterday I found out about the Google Charts API and I was impressed by this excellent service but noticed that creating multiple charts got pretty messy, especially if I wanted to edit the data later on.

I figured if I wanted to use this in the future, I’d like an easier way to create charts out of my data - thus the class GoogChart was born.

What I wanted to do was to simplify the process of calling the API, say I’ve got my data in an array called $data: