Promotic

FindTrend - method of the PmgTrendViewer object

Description:
Search for the trend (object of the tvTrend type) according to specified parameters, for example the defined position.
Syntax:
Long FindTrend(Long nType, Variant vPar1, Variant vPar2)
Parameters:
nType(Long) The trend search method
10 - the trend progression is searched (i.e. object of the tvTrend type) closest to the defined position X, Y, the position is entered relative to the left upper corner of the trend panel (this panel is delimited by scales)
vPar1(Variant) the search parameter. If nType is set to 10, then X coordinate inside the chart panel is entered relative to the left upper corner of the chart panel (delimited by scales)
vPar2(Variant) the search parameter. If nType is set to 10, then Y coordinate inside the chart panel is entered relative to the left upper corner of the chart panel (delimited by scales)
Return value:
If the trend has been found, then it returns the trend order (index) in the trend list (see Trends, the first trend in the list has index 0).
If it has not been found, then it returns -1.
Note:
This method is also functional in Web panels.
 
The method is used only if the graphic mode is set.
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Items("../TrendView");
var nTrend = oTView.FindTrend(10, 230, 110);
Example2:
It is usefull to use it in the onMouseArea event, when the trend is activated by clicking the mouse (on the trend progress), see Example2 of this event.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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