The object of the tvTrend type can be connected to the source of data (e.g. by the tvTrend.Connect method) and in this case the viewer reads the data from the source automatically - from the trend server. The trend server is the PROMOTIC application that stores data by means of the PmaTrendGroup object.
But the trend variable needn't be connected to the server in the viewer and thus data points that form the process of the variable, can be set by calling object methods of the tvPoints type, for example, the tvPoints.AddPoints, see the example Example for displaying mathematical functions by means of a trends viewer. In this case it is also possible to use the onReadData event for the dynamic filling up by the AddPoints method (see the above mentioned example).
The object of the tvPoints type is in both cases (connected or disconnected tvTrend object) the holder of data points (either set by the tvPoints.AddPoints method or read from the server).
Each tvTrend object has at least one basic tvGraph object and an access to it is made by means of the tvTrend.GraphDefault property.
The tvTrend object can have more objects tvGraph (each can be configured, for example, by different color), they are added by calling the tvTrend.AddGraph method and in this case it is necessary to define at such objects in which time slot which object is drawn, see the sValidityFce parameter of the AddGraph method.
Thus it is possible by means of the tvGraph object, for example, to display the graphic process of the variable that is green by default but in the range of the exceeded limit value this curve is red. In the table mode it is possible by means of the tvGraph object to display values exceeding the limit by different color or by different font.
See the draw type of the tvTrend and tvGraph.
The scale of the time (X) axis of the viewer is set by the TimeMin and TimeMax properties, the range of the value (Y) axis is set by the tvTrend.ValueMin and tvTrend.ValueMax properties of the active trend.
The period of reading is set by the the AutoscrollRate property, and the way of reading and moving the time axis by the AutoscrollType property.
To change setting of the time or value axes is possible in objects ScaleTime or ScaleValue, to change setting of the grid properties is possible in objects GridTime or GridValue.
Both viewers can be printed, for example, by the SaveToHtm method with the help of HTML pages supplied with the viewer in both graphic and table modes. These HTML pages can be copied, edited if necessary and use instead of the original ones supplied with the system.
It is possible to change the list of currently displayed trends dynamically on the runtime by the DlgTrends and tvTrend.DlgProperties methods
This object is functional also in Web panels.