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 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 for VBScript (see the 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.27 SCADA system documentation MICROSYS, spol. s r.o.

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