TimeOffset - property of object tvPoints
The time of each point from the buffer with points of the tvPoints
object is increased by the value set in this property (either read from the trends server or 'manually' defined by the AddPoints
method) and the trend progress is then drawn in these calculated time intervals (it is possible to move the whole curve).
TimeOffset As Double
oPoints.TimeOffset = n
Property access for read and write. Preset value of the property is 0.
The definition of the curve only by relative time intervals, displaying the curve in the real time is achieved by the offset definition in TimeOffset.
var vTimes, vValues, tNow;
var oTView = pMe.Acx;
var oPoints = oTView.Trends("t1").Points;
tNow = Pm.CreatePmDateObject().GetValue();
vTimes = Pm.CreatePmArray().Array1(tNow-6/24, tNow-5/24, tNow-4/24, tNow-3/24, tNow-2/24, tNow-1/24);
vValues = Pm.CreatePmArray().Array1(60, 40, 70, 50, 10, 80);
oTView.TimeSetType = 1;
oPoints.AddPoints(vTimes, vValues, 0, 0);
//Moving the whole curve into the current time minus one day.
oPoints.TimeOffset = tNow -1;