Horizontal Line Series Marks position

Ideas and wishes for TeeChart
Post Reply
SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Horizontal Line Series Marks position

Post by SteveP » Wed Nov 19, 2003 2:32 pm

Ability to show marks on Horizontal Line Series to the left or right of its points (like a Horiz Bar series can), instead of above its points. Since the Horiz Line series is used to show data in a left-right format, having its marks also aligned that way makes sense (to me).

David Berneda
Site Admin
Site Admin
Posts: 83
Joined: Wed Nov 12, 2003 5:00 am
Location: Girona, Catalonia
Contact:

Post by David Berneda » Wed Nov 19, 2003 4:26 pm

Thanks for your suggestion. Logged at our wish-database to implement in next v7 release, if possible.

One possible solution is to add an "alignment" property to marks, being "top or bottom" the default for most series, and "left or right" for horizontal bar and line series.

As a workaround, you can use a code similar to this one:

procedure TForm1.FormCreate(Sender: TObject);
var P : TPoint;
t : Integer;
begin
Series1.FillSampleValues(6);
Chart1.Draw;

Chart1.Canvas.AssignFont(Series1.Marks.Font);

for t:=0 to Series1.Count-1 do
begin
P.X:=Series1.CalcXPos(t);
P.Y:=Series1.CalcYPos(t)-(Chart1.Canvas.FontHeight div 2);

with Series1.Marks.Positions[t] do
begin
Custom:=True;
LeftTop:=P;
end;
end;
end;

regards
david

Post Reply