index of the slice.urgent

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Divya

index of the slice.urgent

Post by Divya » Tue Oct 29, 2002 7:24 pm

Hello,

In a PieChart how can i find the index of the slice in the click event?

Thanks
Divya

Dave Gilbert

Re: index of the slice.urgent

Post by Dave Gilbert » Wed Oct 30, 2002 9:10 am

In the ChartMouseEvent class, you can use the getEntity() method to find out which entity (if any) has been clicked on. You can check if this is an instance of PieSectionEntity - if it is, the methods of the PieSectionEntity class will tell you all you need to know.

Regards,

DG.

Divya

Re: index of the slice.urgent

Post by Divya » Wed Oct 30, 2002 5:36 pm

Hi Dave,

Thanks for the info.that is working.

Regards,
Divya.

Locked