Promotic
WikipediaLinkedInYoutubeTwitterFacebook

FindTrend - method of the PmgTrendViewer object

Description:
Searching 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 upper left edge 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 upper left edge 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 upper left edge of the chart panel (delimited by scales)
Return values:

If the trend has been found, then it returns the trend order (index) in the etrend list (see Trends, the first trend in the list has index 0).
If it has not been found, then it returns -1.
Note:
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.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice