I'm creating a web application on Google App Engine for fun and I'd like to include graphs so users can see some stats. Are there any free (either as in beer or speech) JavaScript libraries that can take a table or make some AJAX call and display a graph?
Flot can create some really nice looking charts. It's a JavaScript library rather than a service like Google Charts. It does require jQuery though.
I noticed that a few people mentioned Flot but nobody mentioned Flotr! Also on Google Code http://code.google.com/p/flotr/.
Check a JSON example, complete with the code to do it, right here.
It requires the Prototype.js Javascript library and works in all modern browsers!
Here is my personal shortlist with comments:
- Flot: +beautiful presets +very easy to use (the hardest was converting ISO datetimes to Javascript dates, which isn't hard at all) +uses jQuery - doesn't do pie charts, -looks a little bit abandoned but I could be wrong about that
- Flotr: ++even prettier charts than Flot +-uses Prototype (which I've never worked with), -no pie charts either
- YUI: +pie charts! + support and strong team & community -uses Flash, ugh -doesn't handle time axes as nicely as Flot
- Google charts API (not a JS library): +support & community +pretty, too -really tedious construction of the REST URLs for any more complex graph -no automatic date/time axis support
In a nutshell, for tiny little simple graphs I'd use the Google charts API, but for my current project (an internal reporting tool) it'll likely be Flot, though if it was client-facing code I'd probably either look further or give Flotr/Prototype a try.
Highcharts looks really impressive. It's based on jQuery or Mootools.