How to make the Section and Label have the same color?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
alemjann
Posts: 31
Joined: Wed Aug 06, 2003 6:51 am
Location: Beijing

How to make the Section and Label have the same color?

Post by alemjann » Fri Nov 14, 2003 3:12 am

thus:
In Piechart
1. How to get the color of each Section.
2. How to set the color of each Section Label.

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 Nov 14, 2003 10:03 am

At the moment all section labels use the same paint, set using the setSectionLabelPaint(...) method. So you'd need to modify the code to change that (it wouldn't be difficult). The getSectionPaint(int) method will tell you the color for each section.
David Gilbert
JFreeChart Project Leader

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

alemjann
Posts: 31
Joined: Wed Aug 06, 2003 6:51 am
Location: Beijing

Post by alemjann » Fri Nov 14, 2003 10:40 am

Thanks David !
I ask this question thinking that use different colors to display labels may lighten the overlap problem.

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 Nov 14, 2003 10:44 am

Another developer has sent me some code for improving the pie chart labels, and I also have some half completed code that I worked on a while back. It won't make it into the next release, but it is reasonably high on the priority list to get resolved.
David Gilbert
JFreeChart Project Leader

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

Locked