Drill Down feature for pie chart in Java

Hi,

I have a JSP where the graph displayed should have 慏rill Down?functionality i.e. when clicked on any sector of Pie chart it should come up with other graph giving more details.

I need the code or how to proceed to get drill down feature.

If anyone has idea about 慸rill down?or any sites which can help me please reply.

Thanks in advance.

Praveen.

[387 byte] By [Praveen1229a] at [2007-11-26 14:11:31]
# 1
What graphing component are you using now?
cotton.ma at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 2

> If anyone has idea about 慸rill down?or any sites

> which can help me please reply.

>

If you are willing to deploy a JApplet then you can implement this using JFreeChart (www.jfree.org) . It does not come with this feature 'out of the box' but it should not be too difficult to implement.

sabre150a at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 3
Graphing Component means what?Like i have to display Pie chart. On click of any one sector on Pie Chart should result in Line graph.Please help me.Regards,Praveen.
Praveen1229a at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 4
> Like i have to display Pie chart. On click of any one> sector on Pie Chart should result in Line graph.> Fairly easy with JFreeChart and most other Java charting components.
sabre150a at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 5
I have to display the graph on JSP. I cannot use JFree Chart tool.Can i get cny drill down code or way to approach it. so that i can incorporate it myself in the Jsp.Thanks and Regards,Praveen.
Praveen1229a at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 6
You know that a JSP is outputiing HTML right? So in the end you are going to have to output an image with links in an image map (or whatever it is called) due to the irregular shape of the images.Or maybe something devious with CSS.
cotton.ma at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 7

> I have to display the graph on JSP. I cannot use

> JFree Chart tool.

That is a good thing because using JFreeChart it is not as easy as I thought . I see no methods for converting a mouse click to a data index (or item).

Correction: It is easy! One just adds a ChartMouseListener to the ChartPanel and the value is available in the Entity property of the ChartMouseEvent .

Message was edited by:

sabre150

sabre150a at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 8

You have to generate the image and the surrounding HTML using two seperate transactions; typically a JSP delivers the HTML and a servlet, invoked by the SRC URL of an image tag, provides an image.

Your HTML contains a form, and the image is displayed using a <Input type="image" .. Clicking on that submits the forn, providing X and Y coordinates as parameters to a servlet which can calculate which pie-slice has been clicked. You can't use a client-side image map because there are no suitable sensitive shapes available.

malcolmmca at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 9
have you check the ServletUtilies class in JFree?you can create an image with a mapping
suparenoa at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 10
How can I ckeck which Pie Slice calculated?
Praveen1229a at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...
# 11
You can try elegantj charts. It has N level drill down facility. Eventhough its a new tool, it provides ultimate interoperability.You can find it at: www.elegantjcharts.com
ems2005a at 2007-7-8 1:59:38 > top of Java-index,Java Essentials,Java Programming...