Use this property to return/set values that determines the trending characteristics for your application.

Trend uses the Trend Class set of properties for its characteristics.



Dim TrendSample As Integer

'Trend - command button control
'TrendTimer- timer control
'Trending commences upon first click; trending stops upon second click.
Private Sub Trend_Click()
     If TrendTimer.Enabled Then
          TrendTimer.Enabled = False
          XYChartCtl1.Trend.Enable = False
          With XYChartCtl1
               .Trend.Enable = True
               .Trend.DisplayLength = 50
          End With

          TrendSample = 1
          With TrendTimer
               .Interval = 100
               .Enabled = True
          End With
     End If
End Sub

Private Sub TrendTimer_Timer()
     Dim arrData(1, 2) As Integer

     arrData(1, 1) = TrendSample
     arrData(1, 2) = Int((201) * Rnd - 100)

     XYChartCtl1.Trend.AddData 1, arrData

     TrendSample = TrendSample + 1
End Sub


See Also

Properties     Trending feature