Page 1 of 1

How to control the legend size ??

Posted: Tue Feb 01, 2005 5:55 pm
by 9080952
Hi,

I am trying to get some control over the size of the legend.

First I try to set the maximum number of lines to 20 by means of:
tChart1.Legend.MaxNumRows = 20;

but in case of 50 series the legend keeps growing vertically till it reaches the bottom.

I want to set the max. number of lines for my legend, so that I can activate my TrackBar for scrolling in case the no. of lines in the legend exceeds that max. number.

But how can I do that ??

Some help would be nice.

Thanks.

Regards,
Antoon Koster
Netherlands

Posted: Wed Feb 02, 2005 12:09 pm
by Chris
Hi Antoon,

To achieve this behaviour you should use this code:

Code: Select all

for(int i =0; i < 50; ++i) 
{
tChart1.Series.Add(new Steema.TeeChart.Styles.Line());
tChart1[i].FillSampleValues(10);
if(i < 3) 
tChart1[i].ShowInLegend=false;
}
MaxNumRows Sets the Maximum number of Legend Rows to display for a horizontal (Chart Top or Bottom) Legend.[/code]