views:

153

answers:

2

I am searching for a free charting library, either in Java, JS, or Flash, that allows for drill-down type interaction. An example of this sort of behavior can be found in the trends section on mint.com. JFreeChart seems like the generally recommended choice for charting purposes, but from a little browsing of their API there doesn't seem to be any obvious way to detect mouse clicks on a particular slice and change the chart in response.

Any advice on how to handle this sort of behavior using JFreeChart, or if this is not possible any recommendations for other libraries that do support this behavior?

+1  A: 

That depends on where you intend to use the chart.

For Swing-based application, chart drawn within ChartPanel can very much handle mouse events and you can update it to your heart's content.

For a web page where chart is being rendered as image, you can generate a client side image map to accompany the chart and, using AJAX, re-generate and replace the image as needed.

However, the easier option is perhaps to use Flot for dynamic charting. Take a look at their interactive examples and decide whether that suits your needs.

Edit Oops, I didn't notice that you were asking about pie charts specifically. What kind of "drill-down" can you do on pie chart, though?

ChssPly76
Thanks for the link to ChartPanel and ChartMouseEvent, those may be just what I'm looking for.
toluju
Confirmed working as needed, thanks!
toluju
A: 

why not use Google Visualisation API ?

  1. It is free.

  2. Served fast from Google CDN so it does not take any of your bandwidth.

For an example may you take a look at http://geognos.appspot.com/geo/en/cc/gr.html#Economy

nickmilon