Page 1 of 1

Marks and Arrows after resize

Posted: Thu Apr 07, 2005 7:56 pm
by 9334169
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
:(

Posted: Fri Apr 08, 2005 7:52 am
by narcis
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.

Posted: Fri Apr 08, 2005 2:51 pm
by 9334169
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

Posted: Fri Apr 08, 2005 3:21 pm
by narcis
Hi Gerard,

According to TeeChart help file: "Component defines position for the Mark referenced by the position index".