Hi,
I've just upgraded the JFreeChart version of JSF Chart Creator to 1.0.5 and faced with a pie section color problem.
setSectionPaint(int i, Color color) is deprecated and replaced with
setSectionPaint(Comparable i, Color color).
Problem is when I use something like setSectionPaint(new Integer(i), Color.Black) it does not work.
Regards,
Cagatay
Pie Section Color Problem
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The Comparable parameter in the new method is a dataset key - you associate the Paint for a section with the section's key (rather than its index, as before). This allows the dataset to be reordered easily, without having to reorder the section attributes simultaneously.
With hindsight, this change is a bit disruptive and probably should have been held for the 1.2.x series...but a client needed it, so I did it.
With hindsight, this change is a bit disruptive and probably should have been held for the 1.2.x series...but a client needed it, so I did it.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

