Page 1 of 1

Change vertical Position of a single Marks

Posted: Wed May 05, 2004 3:23 pm
by 8576420
8) Hi NG,

i would like to change the vertical Position of a single Marks within a series so that if there multiple series displayed with marks, i can change the marks position of every displayed point above or beneath the TFastline.

Any idea how i can achive this ??

Im Using Teechart V6.01 on Delphi 5 Enterprise

Thanks in advance
Michael

Posted: Wed May 05, 2004 5:46 pm
by Pep
Hi Michael,

you can use the Drag Marks tool or change the Marks positions by code using something like the folloiwng code :

Code: Select all

var i: Integer;
begin
     for i := 0 to Series1.Marks.Positions.Count - 1 do
     with Series1.Marks.Positions.Position[i] do
     begin
          Custom := true;
          LeftTop.x := Series1.CalcXPos(i);
     end;

     Series1.Repaint;
end;
Please note that series marks are created when chart is drawn for the first time. If you'll try to access TSeriesMark.Positions before chart (and arks) is drawn for the first time, you'll trigger AV error.