error occured while moving marks manually
error occured while moving marks manually
enclosing error image while moving marks and this code i used to move
TeeCommander1.Chart = TChart1
For i = 0 To TChart1.SeriesCount - 1
For J = 0 To TChart1.Series(i).count - 1
TChart1.Environment.InternalRepaint
TChart1.Series(i).marks.Positions.POSITION(J).custom = True
TChart1.Series(i).marks.Positions.POSITION(J).LeftTop.Y = 100
Next J
Next i
TeeCommander1.Chart = TChart1
For i = 0 To TChart1.SeriesCount - 1
For J = 0 To TChart1.Series(i).count - 1
TChart1.Environment.InternalRepaint
TChart1.Series(i).marks.Positions.POSITION(J).custom = True
TChart1.Series(i).marks.Positions.POSITION(J).LeftTop.Y = 100
Next J
Next i
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
I'm not able to reproduce the problem here using v7.0.1.1 which is the latest version available at the client area. Which TeeChart version are you using?
I'm not able to reproduce the problem here using v7.0.1.1 which is the latest version available at the client area. Which TeeChart version are you using?
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
Could you please download the version I told you and check if it works at your end?
Thanks in advance.
Could you please download the version I told you and check if it works at your end?
Thanks in advance.
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 |
and also when i move the marks how to move the marks associ
version 7.0.8 is working but marks are moved to 100,100 but the lines pointing from bar to marks are not moved , just the marks moved , linesconnected to bar to the marks does not moved ...? how can i move those lines ...
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
Yes, it seems we forgot to change that.i have download the latest version which is shown on the customer download page version 7.1.1 but my activex shows after download 7.0.8
Yes, marks arrows are not moved and I'm afraid they cannot be moved as marks can. However you can do something similar using annotation tools:version 7.0.8 is working but marks are moved to 100,100 but the lines pointing from bar to marks are not moved , just the marks moved , linesconnected to bar to the marks does not moved ...? how can i move those lines ...
Code: Select all
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
TChart1.Series(0).FillSampleValues 10
For i = 0 To TChart1.SeriesCount - 1
For j = 0 To TChart1.Series(i).Count - 1
TChart1.Environment.InternalRepaint
TChart1.Tools.Add tcAnnotate
With TChart1.Tools.Items(TChart1.Tools.Count - 1).asAnnotation
.Text = TChart1.Series(i).YValues.Value(j)
.Shape.CustomPosition = True
.Shape.Left = TChart1.Series(i).Marks.Positions.Position(j).LeftTop.X
.Shape.Top = 100
.Callout.Arrow.Visible = True
.Callout.XPosition = TChart1.Series(i).CalcXPos(j)
.Callout.YPosition = TChart1.Series(i).CalcYPos(j)
End With
Next j
TChart1.Series(i).Marks.Visible = False
Next i
End Sub
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
Another alternative to annotation tool is using rectangle tool which can be dragged by default.
No, this is not a bug, you can move the marks arrows using something like this:and also if marks are able to move and how can marks line cannot be moved ....? is this a bug ..
Code: Select all
Public Sub fix_mark_position()
Dim i As Integer
Dim xval As Double, yval As Double
Dim x As Double, y As Double
Dim x_pos As Double, y_pos As Double
Dim XSerie As TeeChart.ISeries
Set XSerie = TChart1.Series(0)
For i = 0 To XSerie.Count - 1
x = XSerie.CalcXPos(i)
y = XSerie.CalcYPos(i)
With XSerie.Marks.Positions.Position(i)
xval = .ArrowFrom.x - x
yval = .ArrowFrom.y - y
.ArrowFrom.x = x
.ArrowFrom.y = y
.LeftTop.x = .LeftTop.x - xval
.LeftTop.y = .LeftTop.y - yval
.ArrowTo.x = .ArrowTo.x - xval
.ArrowTo.y = .ArrowTo.y - yval
End With
Next i
End Sub
You can also move annotation with the mouse as shown here:How about moving this annotation tool with mouse ..? can you send me code for moviing with mouse .....
Code: Select all
Option Explicit
Dim fdragging As Boolean
Dim fitem As Integer
Dim text As String
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scLine
.Series(0).FillSampleValues (50)
.Zoom.Enable = False
End With
End Sub
Private Sub Command1_Click()
TChart1.Tools.Add (tcAnnotate)
With TChart1.Tools.Items(TChart1.Tools.Count - 1).asAnnotation
.text = "hello"
.Shape.CustomPosition = True
.Shape.Left = 100
.Shape.Top = 100
End With
End Sub
Private Sub TChart1_OnMouseDown(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
Dim i
With TChart1.Tools
For i = 0 To .Count - 1
With .Items(i).asAnnotation.Shape
If X >= .Left And X <= (.Left + TChart1.Canvas.TextWidth(TChart1.Tools.Items(i).asAnnotation.text)) Then
If Y >= .Top And Y <= (.Top + 15) Then
fdragging = True
fitem = i
End If
End If
End With
Next i
End With
End Sub
Private Sub TChart1_OnMouseMove(ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
If fdragging Then
With TChart1.Tools.Items(fitem).asAnnotation
.Shape.CustomPosition = True
.Shape.Left = X
.Shape.Top = Y
End With
End If
End Sub
Private Sub TChart1_OnMouseUp(ByVal Button As TeeChart.EMouseButton, ByVal Shift As TeeChart.EShiftState, ByVal X As Long, ByVal Y As Long)
fdragging = False
End Sub
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 |
i have posted the vb sample prg along with test.tee file
in this tee file i have multiple series .
once the form is loaded ,click on the move marks which will move the marks to the position to y=100 and then click on fix marks( code which is given to me for moving mark arrow )....
you can see the marks moved to y=100 but the lines connecting marks and bars does not moved properly
pls check
aravind
in this tee file i have multiple series .
once the form is loaded ,click on the move marks which will move the marks to the position to y=100 and then click on fix marks( code which is given to me for moving mark arrow )....
you can see the marks moved to y=100 but the lines connecting marks and bars does not moved properly
pls check
aravind
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
Yes, you are right. Try changing the "fix marks" button code for this:
Yes, you are right. Try changing the "fix marks" button code for this:
Code: Select all
Private Sub Command3_Click()
Dim i As Integer
Dim XSerie As TeeChart.ISeries
TChart1.Environment.InternalRepaint
For j = 0 To TChart1.SeriesCount - 1
Set XSerie = TChart1.Series(j)
For i = 0 To XSerie.Count - 1
With XSerie.Marks.Positions.Position(i)
.ArrowFrom.x = .LeftTop.x + (.Width / 2)
.ArrowFrom.y = XSerie.CalcYPos(i)
.ArrowTo.x = .ArrowFrom.x
.ArrowTo.y = .LeftTop.y + .Height
End With
Next i
Next j
End Sub
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 |
i have inserted code , line are connecting to marks to the bar (straight )
if we move the marks again and excecute your code , lines are drawn straight not the custom position ..
is there any way we can draw the line as per the marks positions (where marks are moved user on random basis ) ...
aravind
if we move the marks again and excecute your code , lines are drawn straight not the custom position ..
is there any way we can draw the line as per the marks positions (where marks are moved user on random basis ) ...
aravind
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi aravind,
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
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 |
sample app posted in newsgroup
issue 1:
steps
1. click on the move marks
2. move the marks using cursor
3.now click the fix marks
4. check how the lines are formed (lines are hanging)
issue 2;
reload the form
1.click on the move marks
2.click on the fix marks (lines connect from bar to mark)
3.now move the marks using mouse
4.now click on the move marks(reassing the positions), lines did not move
5.now i click again the fix marks , you can see lines are hanging from marks but no connectivity to the bars
aravind
issue 1:
steps
1. click on the move marks
2. move the marks using cursor
3.now click the fix marks
4. check how the lines are formed (lines are hanging)
issue 2;
reload the form
1.click on the move marks
2.click on the fix marks (lines connect from bar to mark)
3.now move the marks using mouse
4.now click on the move marks(reassing the positions), lines did not move
5.now i click again the fix marks , you can see lines are hanging from marks but no connectivity to the bars
aravind