Page 1 of 1

TChart legend woes

Posted: Tue Feb 22, 2005 1:06 pm
by 4206059
Hi,

I have a TChart (5.01) in which a variable amount of series can be placed.

I have a legend at the bottom, and have set the Legend.ResizeChart to true, and some margin (like 4%) to bottom.

Sometimes the legend is nicely spread out like;

--
Series 1 Series 2 Series 3
Series 4
--

But sometimes the legend refuses to do this, but it stacks the legend like;

--
Series 1
Series 2
Series 3
Series 4
---

Is there a property that prevents stacking it like this ? I have 7 series max, and would like to have them ordered 3 on a row max, or else the chart gets drastically resized.

Thanks in advance,
- Jorgen

Posted: Wed Feb 23, 2005 7:41 pm
by Pep
Hi Jorgen,

you could try using :
Chart1.Legend.MaxNumRows := 3;
This will allow to show 3 Rows as maximum.

Posted: Thu Feb 24, 2005 10:03 am
by 4206059
Thanks Pep!

But would that not just constrain the number of items on the row to max 3? Right now it does not even reach 3, it sticks to 1 item per row and stacks them under each other, when there is no real need for it.

Thanks again,
- Jorgen

Posted: Fri Feb 25, 2005 10:41 am
by narcis
Hi Jorgen,

There's no way of doing it directly, la best way is creating a custom legend with the canvas using Annotation tool for example.

Posted: Fri Feb 25, 2005 1:11 pm
by 4206059
Ok Guys,

Here's the kicker! The problem was that I displayed one extra series in my legend which was containing a strange symbol (e.g. with a circle in it) all other line series that are normal series. Whenever I remove that one from the legend, the series display 3x? rows. Thanks a lot for all the help, it appeared some weird artefact in TChart.


- Jorgen