Page 1 of 1

Legend.NumRows and Legend.NumCols

Posted: Sun Jun 29, 2008 3:17 am
by 9337917
Folks,

Under what conditions do the two properties effect Legend.NumRows and Legend.NumCols?

I've tried with Legend.CustomPosition set to True and False, and neither NumRows or NumCols seem to have any effect. Say the user has six legend items, and in one situation might want three rows of two columns, and in another situation, two rows, each row with three columns.

Thanks..:)

Regards,
richard diamond

Posted: Tue Jul 01, 2008 7:42 am
by yeray
Hi Richard,

CustomPosition (true/false) is used to draw the legend in the position indicated for Left and Top properties or in the predefined positions indicated in Alignment property (left, top, right, bottom). That shouldn't have any effect to the properties NumRows and NumCols.

Note that having, for example, one series and six values, the legend has NumRows = 1 and NumCols = 6 by default. And, if you set:

Code: Select all

Chart1.Legend.Alignment := laBottom; 
then, there we'll have NumCols = 6 and NumRows = 1.

So, while there isn't a method/property to customize the number of columns/rows you want to display, you still could customize it using more than one legend. And here, I recommend you to take a look at the "Multiple Legends" example (All features/Miscellaneous/Legend/Multiple Legends) example at TeeChart features demo available at TeeChart's program group.