tvGraph - Deatiled object description

See: the tvGraph object.

The object draws depending on setting the PmgTrendViewer.ViewMode property the data of one tvTrend object either in the form of 2D (3D) graph or in the form of the table as a data column. It can be set in itself the appearance:
- in the graphic mode, for example, the type (linear line, steps, bar, constant, ...), color, width, filling, etc.
- in the table mode the background color of cells in the column, color and font of the value text, .. by its properties. Properties that begin with the Table prefix, set the image in the table mode, for example, the tvGraph.TableTextColor. The column width is specified by the tvTrend.TableColumnWidth property.
The object of the tvTrend type can own more objects of the tvGraph type if needed but it always owns one tvGraph object as a default - see the tvTrend.GraphDefault property. This default object isn't deletable, it is constructed and fixed on the construction of the tvTrend object and if no more tvGraph objects are created by a designer (e.g. by the tvTrend.AddGraph function), then the whole trend is drawn by this default object.

If more tvGraph objects are created, then drawing proceeds according to the specified validity function (see: tvTrend.AddGraph and tvGraph.SetValidityFce) and further according to the priority of individual tvGraph objects. See the detailed description in the tvTrend object.

Let's have oTView object of the viewer. The example sets parameters for the basic tvGraph object and creates new tvGraph object (and sets its parameters), by which the trend of the variable is drawn in the time when values exceed the 100 constant (see LimitVal(gt;100)). In the other time it is drawn by the default graph.
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe;
var oGraphDef = oTView.Trends("t1").GraphDefault;
var oGraph = oTView.Trends("t1").AddGraph(1, 0, "LimitVal(gt;100)");

oGraphDef.Type = "Linear";
oGraphDef.Color = "#00ff00";   // color setting by RGB String in the form "#RRGGBB"
oGraphDef.FillType = 1;   // fill up the area under the graph by the FillColor color
oGraphDef.FillColor = "#008800";   // set the dark green color

if (oGraph)
// ...Settings for the graphic mode of the viewer
oGraph.Color = "#ff0000";   // set the red color
oGraph.Type = "Linear";
oGraph.FillType = 11;
oGraph.FillColor = "#880000";
oGraph.FillColor2 = "#00ff00";
oGraph.PointsVisible = true;
oGraph.PointsType = 3;
oGraph.PointsSize = 8;
oGraph.PointsColor = "#000000";
// ...Settings for the table mode of the viewer
oGraph.TableBgColor = "#aaaaaa";
oGraph.TableTextColor = "#ff0000";
oGraph.TableFont.Size = "#ff0000";
oGraph.TableFont.Bold = true;
// ... error
See also:
- tvTrend.Graphs (method)
PROMOTIC 9.0.21 SCADA system documentation - MICROSYS, spol. s r.o.

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