Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Series in chart, but not in legend
SvenW
Hello,
i have a chart with a series A, B and C.
All series are shown in the chart and also in the legend, but i only want series A and B in the chart.
Is it possible to "delete" an entry in the legend?
Thanks in advance
Sven
Find more posts tagged with
Comments
bhanley
I do not think this is supported, certainly not by the out-of-the-box configuration wizard. You could probably affect the entries in the legend via the Scripting API.
pauljin
you could do it through custom event handler . Use beforeDrawSeries(Series series, ISeriesRenderer isr,
IChartScriptContext icsc) event to hide the chart dynamically. Incase you want to modify legend look into beforeDrawLegendItem(LegendEntryRenderingHints
lerh, Bounds bounds, IChartScriptContext icsc)
SvenW
I tried this before, but i don't know how to skip rendering my legend entry item.
My chart is ok, it's just about the legend.
In my Java class i can set the caption of the entry item, but i can't get rid of the color.
I would prefer to prevent rendering my item, but before drawing i can't remove that item (or i don't know how).
Some background info:
I got a stacked column, consist of 3 parts.
Example:
Series A = 10
Series B = 20
Series C = sum of the other = 30
The value of the parts are displayed inline, besides series C it's displayed above my column.
It's filled dynamically from my Java class and series C is divided by 10000 in my class. In Birt the displayed value is multiplyed by that number. So i got the value above my column as a sum and the part is not displayed, just the value.
I hope you understand, what i want to achieve.
Sven
Virgil Dodson
Hi Sven,
The enclosed example uses script to remove a legend item. Hope this helps.