Dragmarks

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Dragmarks

Post by seanmurphy » Mon Aug 14, 2006 4:01 pm

In the Teechart Demo exe provided with install, under /tools/dragmarks, if a mark is dragged and then the chart is resized/moved (with right mouse bttn) or zoomed, the dragged mark doesn't track the chart the same as the undragged marks do. Is there an easy way I can make my marks track the zoom or chart size/position change?

The other problem I'm haing is the lengtr of the line between the mark and the point (tlineseries), the marks.arrowlength does not seem to be affecting this?

thanks
Sean.

seanmurphy
Newbie
Newbie
Posts: 48
Joined: Fri Mar 12, 2004 5:00 am

Post by seanmurphy » Mon Aug 14, 2006 5:23 pm

I should add that the series I am attaching marks to are created in code with

myrig[1]:=Tchartshape.Create(self);
chart.AddSeries(myrig[1]);
.
.
with myrig[1] do
begin
marks.shapestyle:=fosRoundRectangle;
marks.Visible:=true;
marks.Callout.Color:=clblue;
Marks.Arrow.Color:=clblue;
Marks.ArrowLength:=90; ------has no effect
Marks.Callout.Visible:=true;
marks.callout.Length:=0; -----has no effect
Marks.callout.Visible:=true; //this is the small triangle
Marks.Callout.distance:=0;
end

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

Post by Pep » Wed Aug 16, 2006 11:14 am

Hi Sean,
In the Teechart Demo exe provided with install, under /tools/dragmarks, if a mark is dragged and then the chart is resized/moved (with right mouse bttn) or zoomed, the dragged mark doesn't track the chart the same as the undragged marks do. Is there an easy way I can make my marks track the zoom or chart size/position change?
True. Since series marks custom positions are expressed in screen pixels, they stay the same if you zoom/scroll. A workoarund is to express and store series marks positions in axis values (doubles) and then in one of the TChart events read and translate these values back to screen pixels. This way custom positions will be updated with zoom/scroll (whenever chart is repainted).
There are several ways how to do this (derive new tool, store values in separate array, ...). I think we already have this on our to-do list for
next major release.
The other problem I'm haing is the lengtr of the line between the mark and the point (tlineseries), the marks.arrowlength does not seem to be affecting this?
Using the following code works fine here :
Series1.Marks.ArrowLength:=0;

Stanislaw
Newbie
Newbie
Posts: 18
Joined: Thu Apr 15, 2010 12:00 am

Re: Dragmarks

Post by Stanislaw » Fri Apr 13, 2012 4:22 pm

The problem is still not solved in version 2012. Is even worser, because all marks placed at right side from the draged mark do not move and stay at the place. That can be checked in the provided Demo.

I have one more problem with moved marks. Not all points in my series have associated marks. Thus, when I use the statement Marks.ResetPositions I receive EAccessViolation error. I cannot find solution of the problem. Any suggestion will be appreciated.

Stanislaw

Stanislaw
Newbie
Newbie
Posts: 18
Joined: Thu Apr 15, 2010 12:00 am

Re: Dragmarks

Post by Stanislaw » Fri Apr 13, 2012 4:44 pm

The second problem is solved (beter or worser) by code

with Series4 do if Active then begin
for i:= 0 to Count-1 do Marks.Positions.Automatic(i);
Repaint;
end;

Stanislaw

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Dragmarks

Post by Yeray » Mon Apr 16, 2012 11:16 am

Hi Stainslaw,

Here you can find a workaround suggested for this.
http://www.teechart.net/support/viewtop ... ll*#p34033

Don't hesitate to let us know if you still have problems with it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply