The new Google Chart API is just awesome. I can say that with confidence, because even I was able to get it working in no time flat.
I have a web app (mostly PHP) I use to manage some sales data, and I used to graph my data using PHPlot. PHPlot is a nice PHP graphing package; at the time I started using it, it was the best I could find. Still, while I realize I’m not the brightest frog in the pond, it took me quite a few hours of noodling around with PHPlot to get it to look like I wanted a couple of years ago when I implemented it.
Well, I’m proud to say that after about an hour this morning, I had completely duplicated my existing graph using the new and hotness.
One reason that it didn’t take me long is that the Google Charts folks (do they have their own nickname? Chooglers?) made a decision to return something from whatever mess you send them, even if it’s not what you wanted. This many seem like a small thing, but it didn’t happen by accident. There’s a significant amount of magic going on behind the scenes to return some semblance of a graph from the most twisted parameter arguments. But it’s a big, big deal because it makes it so much easier to incrementally make it look how you want.
What’s more, because it’s REST-based, you can right-click on an image generated by Google Charts, wherever you see one, and see the URL, which will contain all the options, right there for you to copy and even change. And since each image is just a URL, you can try variations, and they’ll all be in your web history, so if you make a misstep, the last known good one is but a back-button click away.
I love this thing! I’ve posted a bit of PHP that I hope will be helpful, along with a quick explanation of something that initially threw me about the chart data you have to send to Google Charts.
