Trend example with Y axis change

<< Click to Display Table of Contents >>

Navigation:  Examples > Trends >

Trend example with Y axis change

Previous pageReturn to chapter overviewNext page

In trends we can choose time interval by clicking on it during running project and calling "Select the start and end time":

selectdateandtime

If we want to change Y axis range we need to use scripts.

Let's use the project from our previous example.

Let's create tag max to change maximum of trend's range:

maxtag

Let's place on our screen Slider on the screen and bind tag max to the Control property of this object:

slidercontrol

And now let's bind tag max to the Trend's maximum property by using ST script. Let's create script:

maxscript

This script will be called when value of the tag max is changed. The text of the script below:

maxscripttext

Let's Run simulation to check your settings:

trendaxisy

You can download this project here.