How to control the legend size ??

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Anthony
Newbie
Newbie
Posts: 35
Joined: Wed Feb 25, 2004 5:00 am
Location: WL| Delft Hydraulics, Holland
Contact:

How to control the legend size ??

Post by Anthony » Tue Feb 01, 2005 5:55 pm

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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Feb 02, 2005 12:09 pm

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]
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply