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
|
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 value:
Returns the created
tvGraph object or if the
creation of the object failed, then it returns the value
null for
JavaScript or
Nothing for
VBScript.
Nothing value can be tested by VBScript
Is operator.
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)");
Dim oTView, oTrend, oGraph
Set oTView = pMe.Items("../TrendView")
Set oTrend = oTView.Trends("t1")
Set oGraph = oTrend.AddGraph(1, 0, "LimitVal(gt;100)")