Friday, January 16, 2015

Google Charts Beats pChart

... like a drum.

For my rainfall project, I've been fighting with the PHP pChart drawing library for some time now, trying to get it to display labels and titles, format axes and so forth, all to no avail. Things work in their examples, but don't work in my code. The documentation for pChart is a complete mess as versions have deprecated functions, but the documentation on the web still shows them as active. The only way I know which functions are really there is to start writing the code in Dreamweaver and have its auto complete feature show me what's available.

I picked pChart because I knew PHP, but didn't know JavaScript very well. I've wanted to learn it, but I didn't want to compound the difficulty by learning a charting library while learning a new language. That concern has been thrown out the window.

Google Charts is a charting library provided for free by ... Google. Everything about it is first class. The documentation is clear, the results are beautiful and its only drawback is that it's written for JavaScript.

Oh well. I was going to learn JavaScript anyway.

No comments: