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)
Disable legend item for special series
chris_w
Hi,
is it possible to disable special legend entries?
Currently it's only possible to enable or disable the legend itself for all rendered series.
Thx
Find more posts tagged with
Comments
mwilliams
What do you mean by a special series? Just a particular series you don't want to show in the legend? If so, you could hide the label and block for this series using your beforeDrawLegendItem script.
Let me know.
chris_w
Yes, for a particular legend item...<br />
<br />
I checked the code completion for <em class='bbc'>LegendEntryRenderingHints</em> in the <em class='bbc'>function beforeDrawLegendItem(lerh, bounds, icsc)</em>, but I can't find something like <strong class='bbc'>lerh.setRenderd(boolean)</strong>.<br />
<br />
How does it work? <br />
Is there anywhere a meaningful documentation of the Event Script API?<br />
<br />
In future it would be awesome to toggle a flag in the Report Designer...<br />
<br />
<br />
Thank you
lrnrit
hi,
you could hide particular legend item (XYZ) by using this code onRender of chart:
function beforeDrawLegendItem( lerh, bounds, icsc )
{
if(lerh.getLabel().getCaption().getValue() == "XYZ")
{
bounds.setHeight(0);
bounds.setWidth(0);
}
}
I hope it will help .
lrnit
chris_w
Thank you lrnrit,
that's working but it is just a workaround, because it destroys the alignment of the legend items.
Let me explain. If you have 3 items and you want to disable the second item with the solution mentioned above, space is left between the first and third one. There is no auto adjustment...
I will open a feature request...
lrnrit
<blockquote class='ipsBlockquote' data-author="'chris_w'" data-cid="81902" data-time="1314272536" data-date="25 August 2011 - 04:42 AM"><p>
Thank you lrnrit,<br />
<br />
that's working but it is just a workaround, because it destroys the alignment of the legend items.<br />
<br />
Let me explain. If you have 3 items and you want to disable the second item with the solution mentioned above, space is left between the first and third one. There is no auto adjustment...<br />
<br />
I will open a feature request...<br /></p></blockquote>
<br />
<br />
hi , <br />
<br />
ya that will be great to have such option.<br />
<br />
lrnit
mwilliams
Yes, this would be a great option. Please post the request info in here so that others with this same issue can vote for your request.
chris_w
Please vote for this enhancement...<br />
<br />
<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=355822'>VOTE
here</a>