Scrolling Historical Data

This example shows how to create buttons to scroll through historical data and set the current time in a chart.

Example: Creating Buttons that Scroll Back and Scroll Forward through Historical Data and Set Current Time

Private Sub CommandButton1_Click() 'Scroll back button.

     Chart1.ScrollBack

End Sub

 

Private Sub CommandButton2_Click() 'Scroll forward button.

     Chart1.ScrollForward

End Sub

 

Private Sub CommandButton3_Click()

'This button manually sets the chart to the current time and

'refreshes the data.

     Chart1.EndTime = Now

     Chart1.RefreshChartData

End Sub