Question:
How can I set up the application so that the horizontal axis is edited at run time, to either Real Time or Historic?
Solution:
To do so, you must use SetHistoricPeriod and SetRealTimePeriod methods, according to your needs.
Example:
Setting up the horizontal axis to display a historic period
'Screen.Item("E3Chart1").Axes.Item("HorizontalAxis").SetHistoricPeriod(pBegin, pEnd)
Screen.Item("E3Chart1").Axes.Item("HorizontalAxis").SetHistoricPeriod "23/12/2010 00:00:01", "23/12/2010 23:59:59"
Setting up the horizontal axis to display a real-time period
'Screen.Item("E3Chart1").Axes.Item("HorizontalAxis").SetRealTimePeriod(pTimes, timeUnit)
Screen.Item("E3Chart1").Axes.Item("HorizontalAxis").SetRealTimePeriod 2, 1