ptZoomTime() function
- Last UpdatedJun 17, 2024
- 1 minute read
The ptZoomTime() function can be used in a script to change the time range shown on the trend’s horizontal axis.
Category
Pen trend
Syntax
ptZoomTime(TrendName,Zoom);
Arguments
TrendName
The name of the trend object. Must be either a string constant or message tag.
Zoom
Assigning a number larger than 1.0 increases the time period shown on the trend’s horizontal axis. Assigning a number less than 1.0 decreases the time period shown on the horizontal axis.
Examples
The ptZoomTime() function increases the time period shown on the trend’s horizontal axis by 17 percent.
ptZoomTime("PenTrend_1",1.17);
The ptZoomTime() function decreases the time period shown on the trend’s horizontal axis by 50 percent. For example, the ptZoomTime() function reduces the trend’s time period to 30 minutes if the original time range was set to 1 hour.
ptZoomTime("PenTrend_1", 0.5);