Page 1 of 1

Horizontal Line Series Marks position

Posted: Wed Nov 19, 2003 2:32 pm
by 9333098
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).

Posted: Wed Nov 19, 2003 4:26 pm
by David
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