Setting Colors to bars using LayeredBarRenderer

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Vikash
Posts: 1
Joined: Tue Jan 28, 2014 9:04 am
antibot: No, of course not.

Setting Colors to bars using LayeredBarRenderer

Post by Vikash » Tue Jan 28, 2014 9:18 am

Hi,
I am creating 4 bar charts and all charts have same column name so I am using LayeredBarCharts and I am unable to fix colors for bars according to column name. I have tried to fix it by doing like this
for(int i=0;i<dataSet.getColumnCount();i++){
String[] colorCode=colorArr.split(",");
int c1=Integer.parseInt(colorCode[0].trim());
int c2=Integer.parseInt(colorCode[1].trim());
int c3=Integer.parseInt(colorCode[2].trim());
renderer.setSeriesPaint(i, new Color(c1,c2,c3));
}
but it's not working .
Can any one help me?

Thanks
Vikash Singh

Locked