Promotic

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 the tvGraph type 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 example). Nothing value can be tested by VBScript Is operator.
See also:
- tvTrend.GraphsCount (property)
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
}
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

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