Value Labels
Posted: Mon Jan 31, 2011 5:00 pm
Good morning,
I have the following problem with the value labels. await solution, thanks.
I have the following problem with the value labels. await solution, thanks.
Code: Select all
procedure TForm1.RecalcMarks;
var i, tmpx, dx: Integer;
pos: TSeriesMarkPosition;
begin
for i:=0 to Chart1[0].Count-1 do
begin
tmpx:=Chart1[0].CalcXPos(i) + (Chart1[0] as TBarSeries).BarWidth div 2;
pos:=Chart1[0].Marks.Positions[i];
if (tmpx <> pos.ArrowFrom.X) then
begin
dx:=pos.ArrowTo.X - pos.ArrowFrom.X;
pos.ArrowFrom.X:=tmpx;
pos.ArrowTo.X:=tmpx + dx;
pos.LeftTop.X:=tmpx + dx - (pos.Width div 2);
end;
end;
Chart1.Repaint;
end;