how to change marks position through code ...
how to set marks to my coordinates
how to change marks position through code
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
You can do something like this:
You can do something like this:
Code: Select all
Private Sub Form_Load()
TeeCommander1.Chart = tc
tc.Axis.Left.SetMinMax 50, 130
For i = 0 To tc.SeriesCount - 1
With tc.Series(i)
For j = 0 To 20
'We populate the series with random values ranging from 40 to 150
.Add ((150 - 40 + 1) * Rnd + 40), "", clTeeColor
Next j
For ii = 0 To .Count - 1
If (.YValues.Value(ii) > tc.Axis.Left.Maximum) Then
tc.Environment.InternalRepaint
yValue = .CalcYPosValue(tc.Axis.Left.Maximum - 5)
.Marks.Positions.Position(ii).Custom = True
.Marks.Positions.Position(ii).LeftTop.Y = yValue
.Marks.Arrow.Visible = False
Else
If (.YValues.Value(ii) < tc.Axis.Left.Minimum) Then
tc.Environment.InternalRepaint
yValue = .CalcYPosValue(tc.Axis.Left.Minimum + 5)
.Marks.Positions.Position(ii).Custom = True
.Marks.Positions.Position(ii).LeftTop.Y = yValue
.Marks.Arrow.Visible = False
End If
End If
Next ii
' .Marks.Clip = True
End With
Next i
tc.Repaint
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 |
this does not work for requirement
i want to read the existing marks positions ( because i have given user option to move the marks int he chart).
i need to get the marks positions and redraw on the same position ..
i need to get the marks positions and redraw on the same position ..
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Aravind,
You can easily place your marks with a position relative to the original one doing something like this:
You can easily place your marks with a position relative to the original one doing something like this:
Code: Select all
.Marks.Positions.Position(ii).LeftTop.Y = .Marks.Positions.Position(ii).LeftTop.Y - 10
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 |