Update cookies preferences

AddPoints - method of the tvPoints object

Adds one data point or array of data points.
Empty AddPoints(Variant vTimes, Variant vValues, Variant vAttrs, Long nStyle)
vTimes(Variant) Single time value or time array in ascending order.
The time is expected according to setting the PmgTrendViewer.TimeSetType property, i.e. "local time", "standard time" or "daylight-saving time".
vValues(Variant) Single numeric (real) value or array of these values.
vAttrs(Variant) So far is not used, it is necessary to enter the value 0.
nStyle(Long) The style how to add a data point (an array of points) into the tvPoints buffer:
0 - Add a point (an array of points) to the end of the buffer
1 - Delete the content of the buffer and add a point (an array of points)
4 - If the time-range of points of the buffer and the time-range (or only one time) of newly added points overlaps, then keep all points in the buffer and add from new ones only those who don't overlap.
5 - If the time of some added points corresponds with the time of existing points, then the existing points will be kept and these new ones will not be added, others will be added on the corresponding time locations to the buffer of points.
This method is also functional in Web panels.
It has sense only for trends that are not connected to data source (to the variable in the PmaTrendGroup object).
See also:
JavaScriptVBScriptSelect and copy to clipboard

var oTView = pMe.Items("../TrendView");
var oPoints = oTView.Trends("t1").Points;
var vTimes, vValues;
oTView.TimeSetType = 1;   // Time will be entered as: 1 = "local time", 2 = "standard time" even in the daylight-saving season
// vTimes = ...
// vValues = ...
if (oPoints)
oPoints.AddPoints(vTimes, vValues, 0, 0);
See the example in the description of the tvPoints - Deatiled object description object
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

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