Horizontal Line Series Marks position
Horizontal Line Series Marks position
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).
-
- Site Admin
- Posts: 83
- Joined: Wed Nov 12, 2003 5:00 am
- Location: Girona, Catalonia
- Contact:
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
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