Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Change series color in Chart
sirim
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
Find more posts tagged with
Comments
mwilliams
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.