Change colors in 3d Pie Chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
skalluraya
Posts: 15
Joined: Fri Jan 23, 2009 5:36 am

Change colors in 3d Pie Chart

Post by skalluraya » Fri Jan 23, 2009 5:39 am

Hi,

I have just started using JFree chart. Can any one please tell me how to define different colors in 3dPieChart.

skalluraya
Posts: 15
Joined: Fri Jan 23, 2009 5:36 am

Post by skalluraya » Fri Jan 23, 2009 10:03 am

I got he answer setSectionPaint(Comparable key , Color). Thanks i found it in one of the post. I have another small question. Is it possible to give link to a section.

I am using pie chart in a jsp page which shows the some some graphs. I want redirect to another page by clicking on a of pie chart section. Can u catch that event. or is it possible from client side? Is it possible.?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Jan 23, 2009 1:50 pm

You can use the setURLGenerator() method in the PiePlot class to specify the class that will generate the URL for each pie section - this enables you to customise the URL to your requirements. Then, when you create an HTML image map for the chart, these URLs will be embedded in the chart.

The URLs are only used for HTML image maps at present.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

skalluraya
Posts: 15
Joined: Fri Jan 23, 2009 5:36 am

Post by skalluraya » Sat Jan 24, 2009 6:49 am

Thank you sir, It worked.

Locked