Marks and Arrows after resize

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

Marks and Arrows after resize

Post by GG » Thu Apr 07, 2005 7:56 pm

Hi,

I know this has been touched already, but I cannot seems to get it working properly.

I have a point chart (x and y) with marks visible and Arrow visible also because I want the user to be able to move the Mark around and have a line that points to the data point. This is OK until the user decide (damn user) to resize the chart. In that case, everything get screwed (including where the position of the text, the arrow seems to points to nothing etc.. My problem seems to be twofold:

on wich event to place the code (is onresize befor, during or after a resize?)
there does not seems to be too much documentation on TSeriesMarkPosition so i'm a bit lost between what relate to the arrow and what relate to the text.

BTW, I think in the next version of Tchart, this should be automatic

Gerard Garreau
:(

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Apr 08, 2005 7:52 am

Hi Gerard,

You have to transform custom position object from screen to real value, store it and when chart is repainted, do the reverse thing: transform (fixed) real coordinate to screeen coordinate.

A helpful example can be TeeMaps example located C:\Program Files\Steema Software\TeeChart 7.04 for Delphi 7\Examples\TeeMaps (default english installation path). This example uses annotation tools instead o series marks, which is also an option, and shows where to implement the code.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

GG
Newbie
Newbie
Posts: 6
Joined: Fri Nov 15, 2002 12:00 am
Location: Montreal
Contact:

Post by GG » Fri Apr 08, 2005 2:51 pm

Hi, thanks for the prompt answer. I thought that would be the way: store the various position for the mark text and the startpoint and endpoit of the arrow,
in "real" data (as oppose tp pixel), then when zooming, recalculate the pixel position of all those element. In that case, I have a simple question, and here I am a bit confused by the help file on that, is TSeriesMarksPositions the position of the text?

Gerard

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Apr 08, 2005 3:21 pm

Hi Gerard,

According to TeeChart help file: "Component defines position for the Mark referenced by the position index".
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply