Archive for July, 2009
I have been using javascript libraries for charting lately. I find it works well wil ajax / jQuery pages very well instead of flash because they share variables and functions.The best Open Source one I could find was Flot: http://code.google.com/p/flot/ The most obvious thing missing from it is a Pie chart which was added and updated in the forums of the project. The forums can be confusing, the files have been branched changed etc so many times and the thread style of the subject makes it very difficult. so here are the latest files I could gather that include pie, and my updates.
http://anthong.com/examples/flot.pie.zip
Updates include:
Border Layout for labels: The labels are optionally on the outside of the cart square with lines pointing to the respective slice.
Donut Hole: Optionally set an inner radius for a hollow center.
Hover in IE: IE support for flot requires excanvas: http://excanvas.sourceforge.net/ but excanvas does not support a function that makes the hover easy (isPointInPath) so I added a workaround.
I hope this helps, I may make a full project page out of ALL of the flot updates + examples.
enjoy,
Anthony