For instance, I have a bar chart, which has two categories(C1, C2) and three series(S1, S2, S3).
Now I want to set red color for the bar item at (C2, S3), how to do?
Or, I have to customize bar renderer?
Thanks in advance!
How to set color for specified chart item?
-
- Posts: 32
- Joined: Fri May 26, 2006 12:56 pm
- Location: Beijing, China
How to set color for specified chart item?
a cup of Java, cheers!
Sha Jiang
Sha Jiang
Re: How to set color for specified chart item?
Correct: you need to extend the BarRenderer class and override the getItemPaint(int, int) method:
Code: Select all
public Paint getItemPaint(final int row, final int column) {
return clr;
}
-
- Posts: 32
- Joined: Fri May 26, 2006 12:56 pm
- Location: Beijing, China
Re: How to set color for specified chart item?
Thanks, I'll have a try.
a cup of Java, cheers!
Sha Jiang
Sha Jiang