KB-92275: Moving E3Chart’s horizontal axis forwards and backwards.


How can I move back and forward in time on E3Chart’s horizontal axis?


To do so, you must write a script that employsE3Chart’s horizontal axis’s SetHistoricPeriod method.

To move the button forward, use HorScaleBegin property (to obtain the horizontal axis’s initial value) + 1/24/60 (to add one minute) at the beginning, and HorScaleEnd property (to obtain the horizontal axis’s final value) +  1/24/60 (to add one minute) at the end.

To move the button back, use HorScaleBegin – 1/24/60  and  HorScaleEnd –  1/24/60.

Check the model script below:

Sub CommandButton1_Click()
‘Move forward
Set Chart = Screen.Item(“E3Chart1”)
Chart.Axes.Item(“HorizontalAxis”).SetHistoricPeriod (Chart.HorScaleBegin)+1/24/60, (Chart.HorScaleEnd) +1/24/60
End SubSub CommandButton2_Click()
‘Move back
Set Chart = Screen.Item(“E3Chart1”)
Chart.Axes.Item(“HorizontalAxis “).SetHistoricPeriod (Chart.HorScaleBegin)-1/24/60, (Chart.HorScaleEnd) -1/24/60
End Sub



Este artigo foi útil? Was this post helpful?

Leave a Reply

Your email address will not be published.Required fields are marked *