how to change marks position through code
Posted: Thu Sep 21, 2006 11:48 am
how to change marks position through code ...
how to set marks to my coordinates
how to set marks to my coordinates
Steema Software - Customer Support Forums
https://594668.gxwh.asia/support/
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
Code: Select all
.Marks.Positions.Position(ii).LeftTop.Y = .Marks.Positions.Position(ii).LeftTop.Y - 10