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
Marks and Arrows after resize
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Gerard,
According to TeeChart help file: "Component defines position for the Mark referenced by the position index".
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 |
Instructions - How to post in this forum |