Blank space in legend when hidden [message #722885] |
Wed, 07 September 2011 04:50 |
akshay.s86 Messages: 1 Registered: September 2011 |
Junior Member |
|
|
Hey
I looked around for this question all over the forums but did not come across one.
Basically, I have a bunch of line plots on a graph (say about 10-20) and I am able to mark some lines based on some conditions and not mark the other lines. I am masking these lines because I want to show them in the legend and the lines that are not marked, I dont want to show them in the legend.
In beforeDrawLegendItem method,
if(some-condition-is-met-to-hide-legend-entry) {
lerh.getLabel().setVisible(false);
lerh.getLabel().getCaption().setValue("");
lerh.getLabel().setEllipsis(0);
bounds.setHeight(0);
bounds.setWidth(0);
}
What happens is that this creates blank spaces in the legend. The legend element is hidden but the space allotted to it remains and is unused by the other visible legend elements. I was wondering if there is a solution to this.
Thanks a ton!!
|
|
|
Powered by
FUDForum. Page generated in 0.02472 seconds