Promotic

ZoomValue - method of the PmgTrendViewer object

Description:
Zooming trends on the value axis.
Syntax:
Empty ZoomValue(Variant vTrend, Long nType, Long nFixed, Variant vPar1, Variant vPar2)
Parameters:
vTrend(Variant) specification which trends to zoom
-4 - only the active trend, see the TrendActive property.
"", -3 - all trends.
"id" - trend with id identifier, see the tvTrend.ID property.
nType(Long) Type of setting the range
1 - vPar1/vPar2 are new values of the lower/upper viewer edge
10 - Decreasing the zoom range to half of the current length of the value axis with the preservation of the value position according to nFixed.
Set vPar1 and vPar2 to 0.
11 - Increasing the zoom range to double of the current length of the value axis with the preservation of the value position according to nFixed.
Set vPar1 and vPar2 to 0.
20 - Change of the zoom with the preservation of the value position according to nFixed.
There is the multiple of the value axis current length in vPar1, for example 2=increasing the range, 0.5=decreasing the range.
Set vPar2 to 0.
21 - Change of the zoom with the preservation of the value position according to nFixed.
There is a new range in vPar1.
Set vPar2 to 0.
nFixed(Long) Specifies the fixed part while zooming
1 - Zoom with the preservation of the lower edge position
2 - Zoom with the preservation of the upper edge position
3 - Zoom with the preservation of the center position
4 - Zoom with the preservation of the cursor position
vPar1(Variant) New value of the lower edge or the multiple value - according to setting nType
vPar2(Variant) New value of the upper edge or the multiple value - according to setting nType
Note:
This method is also functional in Web panels.
 
The method is used only if the graphic mode is set.
Example1:
Sets the value range for all connected trends to:
down: minimum to -10
up: maximum to 220
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Items("../TrendView");
oTView.ZoomValue(-3, 1, 3, -10, 220);
oTView.Draw();
Example2:
Setting the value axis range for all connected trends to 180 with the preservation of the middle values.
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Items("../TrendView");
oTView.ZoomValue(-3, 21, 3, 180, 0);
oTView.Draw();
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.