"data" - Element array

Specifies the data for the bar trend in the element array display mode.

Synopsis

setValue(string shape, "data", dyn_float avg, dyn_float max, dyn_float min, dyn_float s);

getValue(string shape, "data", dyn_float &avg, dyn_float &max, dyn_float &min, dyn_float &s);

shape.data(dyn_float avg, dyn_float max, dyn_float min, dyn_float s);

Parameters

Parameter Description
shape Name of the object
avg Array of average values
max Array of maximum values
min Array of minimum values
s Array containing s values

Description

This attribute is used to define the values for the element array, with four arrays being passed.

Example

In this example, in addition to the data, all relevant attributes for a user-defined output are also applied here. For detailed descriptions of the different attributes, refer to the relevant sections .

main()
{
  shape bt=getShape("BAR_TREND1");
  dyn_float davg, dmax, dmin, ds;
// Values
  davg = makeDynFloat(20, 30);
  dmax = makeDynFloat(50, 80);
  dmin = makeDynFloat(10, 20);
  ds = makeDynFloat(30, 90);
// Setting the values
  setValue(bt, "data", davg, dmax, dmin, ds);
// Start point for the bars on the X-axis
  bt.xStart = 10;
// Width of the bars
  bt.xWidth = 20;
// Displays all values
  bt.showRange = BAR_MINMAX;
// Height of the average value bar
  bt.heightCenter = 5;
// Width of the ranges
  bt.widthCenter = 5;
  bt.widthTop = 15;
  bt.widthBottom = 8;
// Colors of the ranges
  bt.colorTop = "Red";
  bt.colorBottom = "Green";
  bt.colorCenter = "Blue";
// Update bar trend
  bt.flush();
}

Figure: Bar trend - Trend type: Element array with the values from the example above

Figure: Bar Trend - Element Array (see wincc_oa_path/panels/examples/)

Assignment

Bar trend