I'm looking to create charts which will have the capabity to have drill downs. Does anyone know if JFree Charts have that capability ?
-Sudhir
Can we create drill downs with JFree Charts
-
- Posts: 18
- Joined: Thu May 11, 2006 11:22 pm
-
- Posts: 18
- Joined: Thu May 11, 2006 11:22 pm
-
- Posts: 18
- Joined: Thu May 11, 2006 11:22 pm
Only on the Java side; I haven't done anything with JFreeChart as an applet. Set up a ChartMouseListener, register it with your chart, and then get the URL from the clicked chart entity with something like:
Code: Select all
public void chartMouseClicked(ChartMouseEvent event) {
System.out.println(event.getEntity().getURLText());
}
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
If you are doing this in a client application, you need to add a ChartMouseListener to the ChartPanel, then check the events to see what has been clicked on.
If, on the other hand, you are working on a web application, you need to create an HTML image map for your chart image. There is an ImageMapUtilities class to help with that...explaining how it works will take more time than I have right now. You can customise the URLs in the image map by setting URL generators in the plot or renderer classes.
If, on the other hand, you are working on a web application, you need to create an HTML image map for your chart image. There is an ImageMapUtilities class to help with that...explaining how it works will take more time than I have right now. You can customise the URLs in the image map by setting URL generators in the plot or renderer classes.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

