Hello Everyone,
I am generating a bar chart which has 3 different series, I need to change the color of the bars. How can I do this is BIRT is there a way?
Thank you for the help!!
Regards
Page 1 of 1
Change series color in Chart
#2
Posted 23 March 2012 - 12:44 PM
In your chart editor, under the format chart tab, click on Series. Then, click on the chart palette button at the bottom. You can set the chart palette colors to whatever colors you want. If you need it more dynamic, like certain color for a certain series, you can use the beforeDrawDataPoint function in your chart script and use code like:
if (dph.getSeriesDisplayValue() == "Series 1"){
fill.set(255,0,0);
}
else if (dph.getSeriesDisplayValue() == "Series 2"){
fill.set(0,255,0);
}
else{
fill.set(0,0,255);
}
I think this is right. If not, it's close. I just didn't double check in the actual script area to see if it was 100% correct.
if (dph.getSeriesDisplayValue() == "Series 1"){
fill.set(255,0,0);
}
else if (dph.getSeriesDisplayValue() == "Series 2"){
fill.set(0,255,0);
}
else{
fill.set(0,0,255);
}
I think this is right. If not, it's close. I just didn't double check in the actual script area to see if it was 100% correct.
Page 1 of 1






MultiQuote





