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

Question:

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

Solution:

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

Attachments:

92275.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

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