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)
Modify y-series grouping text in legend
paqman
Hey BIRT Exchange,
Quick question - what's the proper way to modify the text used in the legend for Y series groupings in a stacked bar chart? I have 3 series defined and 2 types of data being grouped:
Find more posts tagged with
Comments
mwilliams
function beforeDrawLegendItem( lerh, bounds, icsc )
{
if (lerh.getLabel().getCaption().getValue() == "TotalOn"){
lerh.getLabel().getCaption().setValue("newValue");
}
else{
lerh.getLabel().getCaption().setValue("newValue2");
}
}
This would do it if you wanted to change all 3 to the same.
paqman
Exactly what I was looking for - thanks!
mwilliams
Very welcome! Let us know whenever you have questions!
Maximo123
Is it possible to modify the legend text for only one series, if we have more than one series
mwilliams
Yes. If you simply used the if portion of the script above and checked the label value for your one series you want to modify, only that label will be modified.
Maximo123
Can you give me an example?
I wanted to hide/modify the legend text of one series. Other series should have legends with the text.
Maximo123
Can you give me an example?
I wanted to hide/modify the legend text of one series. Other series should have legends with the text.
mwilliams
Can you attach an example, that I can run, for me to modify, so I can see your setup? Thanks.