Promotic

AddGraph - method of the tvTrend object

Description:
Creates new object of the tvGraph type (tools for drawing trends) and it adds it into the array of tvGraph objects (the array is accessible by the Graphs method).
The method sets the validity function of the tvGraph object by the sValidityFce parameter.
Syntax:
Object AddGraph(Variant vGraph, Long nStyle, String sValidityFce)
Parameters:
vGraph(Variant) Method of creating the new tvGraph object
1 - The graph is created by copying the basic graph
nStyle(Long) is not used. Set always to 0
sValidityFce(String) Parameter sets the validity function of the object.
It is possible to enter pre-defined strings, see the tvGraph.SetValidityFce method.
If empty string "" is set, then the tvGraph object is created with the validity function "AlwaysFalse".
Return values:
Returns the created tvGraph object or if the creation of the object failed, then it returns the value null for JavaScript or Nothing pro VBScript. Nothing value can be tested by VBScript Is operator.
Note:
This method is also functional in Web panels.
 
The method creates a new object of the tvGraph type with the default ID, see the tvGraph.ID property.
The new object of the tvGraph type with the preset ID can be created also in the "tvTrend > Style > Add" configurator.
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Items("../TrendView");
var oTrend = oTView.Trends("t1");
var oGraph = oTrend.AddGraph(1, 0, "LimitVal(gt;100)");
Example2:
See examples in the description of the tvTrend - Deatiled object description object.
PROMOTIC 9.0.24 SCADA system documentation MICROSYS, spol. s r.o.

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