charts w/ the google chart api.
Posted by detour1999 | Filed under general, nerdly, programming
What if there was something that could merge a sad love for data (and the display thereof) and a disturbing affinity for the web and its development.
What if.
What … t f
Oh hell yes. A relatively simple API that will generate a simple .png of a chart based on data you pass it. Awesome.
so, I had some fun playing with it today.
It’s pretty damned easy to use and puts together some pretty nice results…
not too shabby, right?
Harper suggested I write a php wrapper for the api.
I told him it almost wasn’t worth it since the API is so easy to use. However, being the sad, lonely man that I am, I spent my friday night playing computers.
So, after playing with the API for a couple hours, I have some issues…
- No support for negative numbers. None. WTF?!
- Bar/Line charts only support numbers <=100
check it out:
Lame.
But, there are ways around most of these…
all data needs to be converted to a percentage. So, 1000|100|10|-10 would become 100|10|1|-1.
Negative numbers are still an issue… some people over on the Google Chart API Google Group were talking about adding a second set of data to mimic the x-axis to get the display of the negative number to kinda work.
I decided not to bother with that just yet.
So, I started working on a PHP wrapper for the API that took all of these things into consideration…
…which I should have kinda working this weekend.
-d.