Displays and Symbols > User Controls > Configuring the Trend Window
  
Configuring the Trend Window
The drawing tool has two trend object, the TrendChart and the TrendChartLegacy. The TrendChart is the newest that should be used by default, the other was kept to ensure compatibility with projects created in previous release, the iOS displays are using the previous object.
Double-click any Trend window object in the display to configure it. Table 21 describes the Trend window configuration.

Double-click any Trend window legacy object in the display to configure it. Table 22 describes the Trend window legacy configuration.
Table 21: Trend window settings 
Field
Description
Control Name
Defines a name for the control, so it can be accessed in the CodeBehind script. See Displays Code Behind.
Bind to Tag
Enter with an object property where the Trend configuration will be saved.
Bind Pens to Tag
Enter with an object property where the Pen values will be saved.
Orientation
Horizontal.
Vertical, top to bottom.
Vertical, bottom to top.
Window
Set the trend control background color.
Labels
Set the color of the trend control labels.
Grid Lines
Set the color of the Grid lines
Grid Lines Stroke
Set the Grid line settings.
Cursor
Enables (selected) or disables (deselected) the cursor settings.
CursorPosition (%)
Indicates the cursor position, where 0 means initial position and 100 means end position. For example: Tag.cursorPos.
Cursor Output
Indicates the X axis value for the current cursor position. For example, Tag.cursorOut.
Cursor Color
Defines the cursor color.
Pens Legend
Defines the position of the pens legend in the trend control.
Y Axis
Y scale for each pen - Based on min and max of each pen.
Y range - Defines the minimum and maximum values for the Y-axis
The format of the values in the Y-axis. For valid numeric formats, see Tag Formats. For example, N1 (number with 1 decimal place).
Stack Y scales -
Merge similar Y Scales - Check to merge the similar Y scales.
X Axis
Duration - Defiens the X-axis time span.
XY Chart -
Lables - Define the quantity of horizontal grid lines.
The X-axis format is defined by two fields: first line format and second line format.This is specially useful to define label marks that require two lines of information. For valid date and time formats, see Tag Formats. For example, T (Time) for the first line format, d (short date) for the second line format.
Navigation Contol -
Legend
Defines the position of the legends in the Trend Window.
None.
Top Left.
Top Right.
Bottom Left.
Right Panel.
Bottom Panel.
Pens
 
Tag
Set tag that will provide the value for the pen.
Pen Settings
Set the configuration of the Line color, Line stroke, Fill area and the type of Marker.
Min
Linear scale reference for the tag value, according to the Y-axis range.
Max
Linear scale reference for the tag value, according to the Y-axis range.
Auto
 
SPCEnable
Enable or disable the SPC settings.
SPCSettings
Click to open the SPC settings.
Show Value Area
 
PenLabel
Set the pen name.
Filter level
 
 
Table 22: Trend window legacy settings 
Field
Description
Control Name
Defines a name for the control, so it can be accessed in the CodeBehind script. See Displays Code Behind.
0(online) 1(history)
0 - the control shows the online data.
1 - the control shows the history data. For example: Tag.onLineHist.
OnlineTrigger
The refresh rate of the online trend control. For example, 00:00:01 or {Tag.trendTimeSpan}.
HistoryDateTime
The initial point for the history trend control. For example, {Tag.initialTrendHistory}.
Max Samples
Set the maximum number of samples that will be collected from the database.
Window
Set the trend control background color.
Labels
Set the color of the trend control labels.
Cursor Enable
Enables (selected) or disables (deselected) the vertical cursor.
CursorPosition (%)
Indicates the cursor position, where 0 means initial position and 100 means end position. For example: Tag.cursorPos.
Cursor Output
Indicates the X axis value for the current cursor position. For example, Tag.cursorOut.
Cursor Color
Defines the cursor color.
Pens Legend
Defines the position of the pens legend in the trend control.
Y Axis
 
Range
Defines the minimum and maximum values for the Y-axis.
Labels
Defines the quantity of horizontal grid lines.
Format
The format of the values in the Y-axis. For valid numeric formats, see Tag Formats. For example, N1 (number with 1 decimal place).
X Axis
 
Interval
Defines the X-axis time span.
Labels
Defines the quantity of horizontal grid lines.
Format
The X-axis format is defined by two fields: first line format and second line format.This is specially useful to define label marks that require two lines of information. For valid date and time formats, see Tag Formats. For example, T (Time) for the first line format, d (short date) for the second line format.
Pens
 
Visible
Shows (1) or hides (0) the selected pen. Ex 1 or {showPen1}.
Tag
Set tag that will provide the value for the pen.
Min
Linear scale reference for the tag value, according to the Y-axis range.
Max
Linear scale reference for the tag value, according to the Y-axis range.
Pen
Choose the style, the color, and the thickness of the pen line.
Mark
Set the mark for each point in the trend line.
CursorValue
Set the tag that will receive the real value of the Y-axis, according to the cursor position. For example: Tag.pen1CursorValue.
FieldName
Set the pen name.
Using Y Axis Scaling
Considering:
Y-axis Min = 0;
Y-axis Max = 100;
The trend control allows many pens to be displayed together. When your pens do not have the same range, you can use the tips below to fit your data in the same chart, for better visualization:
If a pen has a lower range, 0 to 1 for example, you can set the Max property of the pen to 1, so when the real tag value is 1, the value 100 will be displayed in the chart. (100/1 scale).
If a pen has a higher range, 0 to 1000 for example, you can set the Max property of the pen to 1000, so when the real tag value is 1000, the value 100 will be displayed in the chart. (1/10 scale).