Change vertical Position of a single Marks

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Elli
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany
Contact:

Change vertical Position of a single Marks

Post by Elli » Wed May 05, 2004 3:23 pm

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
Michael Ellermann
Levatum Softawre AG
Michael.Ellermann@levatum.de

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed May 05, 2004 5:46 pm

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.

Post Reply