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.
Dragmarks
-
- Newbie
- Posts: 48
- Joined: Fri Mar 12, 2004 5:00 am
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
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
Hi Sean,
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.
Series1.Marks.ArrowLength:=0;
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).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?
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.
Using the following code works fine here :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?
Series1.Marks.ArrowLength:=0;
Pep Jorge
http://support.steema.com
http://support.steema.com
Re: Dragmarks
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
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
Re: Dragmarks
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
with Series4 do if Active then begin
for i:= 0 to Count-1 do Marks.Positions.Automatic(i);
Repaint;
end;
Stanislaw
Re: Dragmarks
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.
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |