|
Re: dynamic series symbol and titles in legend [message #367621 is a reply to message #367601] |
Thu, 26 March 2009 17:03 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Can you try something like:
if(
lerh.getLabel().getCaption().getValue().compareToIgnoreCase( "series2")
== 0 ){
bounds.setHeight(0);
bounds.setWidth(0);
lerh.getLabel().setVisible(false);
}
Jason
mh10 wrote:
> Hi,
> i have line graph with three lines/ series on it.
> Now In legend it shows symbols for these three series.
> But i just want to show only one symbol for one line in legend, i don't
> want to show series symbol for remaining to 2 lines, All three lines
> will be displayed on chart though.
>
>
> Any suggestions?
>
>
> Thanks
>
|
|
|
|
Re: dynamic series symbol and titles in legend [message #640032 is a reply to message #640024] |
Thu, 18 November 2010 17:35 |
|
I assume you mean the empty space vertically between two other legend
entries? If so use something like this:
This example assumes you have 3 series in the legend like
series3
series2
series1
and you want to remove series2 and bump up series1
boundsH=0;
boundsW=0;
boundsT=0;
boundsL=0;
function beforeDrawLegendItem(lerh, bounds, icsc)
{
if(
lerh.getLabel().getCaption().getValue().compareToIgnoreCase( "series2")
== 0 ){
boundsL = bounds.getLeft();
boundsT = bounds.getTop();
boundsH = bounds.getHeight();
boundsW = bounds.getWidth();
bounds.setHeight(0);
bounds.setWidth(0);
lerh.getLabel().setVisible(false);
}else{
lerh.getLabel().setVisible(true);
}
if(
lerh.getLabel().getCaption().getValue().compareToIgnoreCase( "series1")
== 0 ){
tempBoundsT = bounds.getTop();
bounds.setTop(boundsT);
boundsT= tempBoundsT;
}
}
Jason
On 11/18/2010 12:14 PM, asadanandan@axiomainc.com wrote:
> Jason, This solution creates an empty space at the position that the
> hidden labels are. Is there a way to remove the empty space?
>
> Thanks
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05108 seconds