Legend items vertically ordered ?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bsonnino
Newbie
Newbie
Posts: 10
Joined: Tue Mar 23, 2004 5:00 am

Legend items vertically ordered ?

Post by bsonnino » Fri May 21, 2004 5:19 pm

Is there a way to align the legend items vertically ? I have a legend at the bottom of the chart, with three columns. I'd like to get the legend items in vertical order, instead of horizontally.

As an example, I'd like something like
1 4 7
2 5 8
3 6 9

I'm using Teechart 6

Bruno

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Sun May 23, 2004 5:25 pm

Hi Bruno,

there's no way to do this autmatically, but this can be done using the canvas techniques. You can see on example of use in the TeeChart Pro Demo features project under :
All Features -> Welcome -> Miscellaneous -> Legend -> Dawing more text

bsonnino
Newbie
Newbie
Posts: 1
Joined: Fri Nov 15, 2002 12:00 am

Post by bsonnino » Mon May 24, 2004 12:12 pm

I've thoght of this, but I have another problem. Later I need the legend the mouse is over in OnMouseMove:

(Sender AS TChart).CalcClickedPart(Point(X, Y), Part);
IF Part.PointIndex >= (Sender AS TChart).Series[0].Count THEN
Exit;
IF Part.Part = cpLegend THEN
FCurrSlice := Part.PointIndex

This will make Part.PointIndex point to the wrong slice, no ?

Bruno

Steve
Newbie
Newbie
Posts: 1
Joined: Fri Feb 06, 2004 5:00 am
Location: Godalming, Surrey, UK
Contact:

What about using OnGetLegendPos?

Post by Steve » Thu Oct 28, 2004 8:00 am

You can alter the X and Y coordinates for each Legend item within the LegendRect (found from OnGetLegendRect event)

Look up help on the OnGetLegendPos event

HTH :roll:

Post Reply