Graphs - method of the tvTrend object
Description:
Returns the
nIndex-th object of the
tvGraph type.
Returns only the objects that were constructed by the designer, for example, by calling the
AddGraph method, it
does not return the
GraphDefault basic object.
Syntax:
Object Graphs(Long nIndex)
Parameters:
nIndex | (Long) Index to the array of tvGraph objects constructed by the designer |
---|
Note:
This method is also functional in
Web panels.
If the object specified in the
nIndex parameter
does not exist, then the property returns the value
null for
JavaScript or
Nothing pro
VBScript (see the example).
Nothing value can be tested by VBScript
Is operator.
Example:
Setting the
Color property (trend line color) of the 0-th object of the
tvGraph type constructed by the designer in the trend named "
t1".
JavaScriptVBScriptSelect and copy to clipboard
var oTView = pMe.Items("../TrendView");
var oGraph = oTView.Trends("t1").Graphs(0);
if (oGraph)
{
oGraph.Color = "#00ff00";
// color setting by RGB String in the form "#RRGGBB"
}
else
{
// ... error
}
Dim oTView, oGraph
Set oTView = pMe.Items("../TrendView")
Set oGraph = oTView.Trends("t1").Graphs(0)
If Not oGraph Is Nothing Then
oGraph.Color = "#00ff00"
' color setting by RGB String in the form "#RRGGBB"
Else
' ... error
End If