The TrendChart is a graphical tool for visualizing data trends. Its purpose is to display and analyze time-series data for process monitoring. Key functionalities include customizable Y and X axes, label and grid line settings, pen configurations, and SPC settings. Applications include monitoring production metrics and quality control. Configuration requires setting control names, binding tags, and defining pen properties. Usage involves selecting trend objects, setting up axes, and configuring visual elements for data display and interaction.
On this page:
Requirements
This component is Portable. It runs both on Windows (WPF) and on Web Pages hosted in any platform.
Configuration
- Go to Displays / Draw.
- On the Components Panel, select Charts, then TrendChart.
- Click or drag-and-drop it on the Drawing area to use it.
- Double-click the object to open the configuration window.
TrendChart Settings | |
---|---|
Field | Description |
Control Name | Defines the name for the control, allowing it to be accessed in scripts. See Display CodeBehind. |
Bind to Tag | Specifies an object to map the TrendChart Control properties. |
Bind Pens to Tag | Specifies an object to map Pens Configuration properties. |
Orientation | Sets the orientation of the TrendChart (Horizontal or Vertical). Options available:
|
Window | Sets the background color of the trend control. |
Labels | Defines the color of the trend control labels. |
Grid Lines | Sets the color of the grid lines in the trend control. |
Grid Lines Stroke | Defines the settings for the grid line stroke. |
Cursor | Enables or disables cursor settings in the trend control. |
Mouse Actions | Enables or disables mouse actions on the trend control. |
Marker Tooltip | Enables or disables tooltips for markers on the trend control. |
By default, the Bind Pens to Tags property will be empty. If you want to dynamically change pens for a single Trend Chart or create specific tags for multiple charts, you need to manually configure the Client.TrendChart.Pens
If the Bind Pens to Tags property is configured and the chart already has default pens set in its configuration, these default pens will be applied to the pen list when no tag names are specified.
X Axis
The X-axis is the horizontal axis of the chart and typically represents time or another continuous variable, such as distance, depth, or volume. When time is represented on the X-axis, the chart allows visualization of how a variable changes over time. The X-axis configurations allow users to customize how time or sequential data will be displayed in the chart.
Trend X Axis configuration | |
---|---|
Field | Description |
Duration | Sets the time span for the X-axis defining a specific time window for the X-Axis and displays the trend over that period. In this mode, the X-Axis represents time. |
XY Chart | Enables or disables the definition of a range for the X-axis. You must define two values (X and Y) to plot against each other. In this mode, the X-Axis does not necessarily represent time. |
Labels | Specifies the number of labels on the X-axis. |
Format | Controls how the time or value format appears defining the format of the X-axis labels. |
Navigation Controls | Enables scrolling and zooming along the X-Axis, providing user-friendly data exploration. |
Y Axis
The Y-Axis is the vertical axis of a chart and represents the range or scale of the values of the data being plotted. It shows how variables change relative to the time or another variable represented on the X-Axis.
Trend Y Axis settings | |
---|---|
Field | Description |
Y scale for each pen | Uses the min and max values of each pen for the Y-axis scale. |
Y Range | Defines a fixed range for the Y-axis. |
Labels | Specifies the number of labels on the Y-axis. |
Format | Defines the format of the Y-axis labels. |
Stack Y scales | Enables stacking of similar Y scales. |
Merge similar Y scales | Merges similar Y scales. |
Pens
Pens represent individual data series, variables, or metrics that are displayed on the chart. Each pen typically has its own color, style, and scale.
Pens Properties | |
---|---|
Field | Description |
ID | Identifier for each pen. |
TagName | Sets the tag that provides the value for each pen. It is possible to associate 2 Tags to the same Pen by using array notation (for example, “Tag.x; Tag.y”. This allows users to use pens’ ShowValueArea property. |
PenSettings | Configures the pen settings, including line color, stroke, and marker type. |
MinValue | Defines the minimum value for the pen according to the Y-axis range. |
Auto | Automatically sets the pen value based on the defined range. |
MaxValue | Defines the maximum value for the pen according to the Y-axis range. |
SPCEnabled | Enables the DrillingChart to display a set of extra pens describing the pen’s statistical process control (SPC). |
SPCSettings | Defines what SPC pens to display. The following options are available: |
ShowValueArea | Defines the behavior of pens containing two tags. The possible values are: |
PenLabel | Sets the name of the pen. |
LimitMinMaxValue | Removes points less than the tag's Min value and greater than the tag's Max value. |
Square | Fills the pen points with a square wave. |
FilterLevel | Specifies the filter level to group points on the XY axis, calculating the average. |
Legend | Defines the position of the legend in the trend control (e.g., RightPanel). Options available: None: No legend is displayed. TopLeft: Positions the legend at the top left of the trend control. TopRight: Positions the legend at the top right of the trend control. BottomLeft: Positions the legend at the bottom left of the trend control. BottomRight: Positions the legend at the bottom right of the trend control. RightPanel: Positions the legend in the right panel of the trend control. BottomPanel: Positions the legend in the bottom panel of the trend control. |
Runtime Execution
When the runtime environment is initiated, the TrendChart Window displays the configured data trends. Users can interact with the chart, adjusting axes and visual elements to refine their data analysis. The TrendChart dynamically updates to reflect real-time data changes, providing a comprehensive view of production metrics and quality control parameters. This tool facilitates detailed process monitoring and supports informed decision-making based on the visualized data trends.
TrendChart Advanced Settings
The Trend Window object is included in the version 2014.2 or newer. You can find the Trend Window object in the Display Drawing environment in the Drawing toolbar. See the image below for the exact location.
Select the Trend object and draw in the display. Double-click the object to open the TrendWindow configuration dialog.
Trend Chart Properties
The trend is able to work with only the Trend Window configuration dialog. However, if you need some advanced requirement, you can create two templates, TrendChart and TrendPen, with some trend properties. See the supported properties named below. Then, bind the main tags of those templates to the Trend Window object. When you change the members, the trend properties changes in Runtime.
TrendChart Template Members Configuration
Name | Type | Description |
AllowRuntimeSettings | Digital | Enables to change the trend settings in Runtime. E.g.: AllowRuntimeSettings = true |
BackZoom | Digital | Enables the back zoom. E.g.: BackZoom = false |
CanBackZoom | Digital | Checks if there is back zoom in the current trend view. E.g.: CanBackZoom = false |
CanNextZoom | Digital | Checks if there is next zoom in the current trend view. E.g.: CanNextZoom = false |
ChartArea | Rectangle* | Gets the trend chart area. E.g.: ChartArea = Rectangle *Create a rectangle template with top, bottom, left, right, width, and height. |
CursorBrush | Text | Color of the primary cursor. E.g.: CursorBrush = “#FF0000FF” |
CursorOutput | DateTime | Current X axis value for the primary cursor. E.g.: CursorOutput = “15/01/2019 11:30:00.000” |
CursorOutputTooltip | Digital | Enables the primary cursor output tooltip. E.g.: CursorOutputTooltip = true |
CursorPosition | Double | Position of the primary cursor related to the trend object area (percentage 0-100). E.g.: CursorPosition = 100 |
Duration | Text | Duration time of the X axis. E.g.: Duration = "1m" |
EnableMouseActions | Digital | Enables mouse actions in the trend object. E.g.: EnableMouseActions = true |
EnableMouseCursorConnection | Digital | Connects the mouse with the primary cursor. E.g.: EnableMouseCursorConnection = false |
EnablePrimaryCursor | Digital | Enable to show the primary cursor after clicking the mouse. E.g.: EnablePrimaryCursorAfterMouseClick = false |
EnableSecondaryCursor | Digital | Enable to show the secondary cursor after clicking the mouse. E.g.: EnableSecondaryCursorAfterMouseClick = false |
EnableYLabelsStackPensMode | Digital | Enables YLabels subdivisions view. E.g.: EnableYLabelsStackPensMode = 1 |
EnableYScaleForEachPen | Digital | Enables individual pen scale for the Y axis. E.g.: EnableYScaleForEachPen = true |
ExpandedMargin | Text | Margin for the trend object when expanded. E.g.: ExpandedMargin = "0,100,0,200" |
GridLinesBrush | Text | Color of the grid line. E.g.: GridLinesBrush = “#FF0000FF” |
HighlightPens | Digital | Enable to highlight the pens when the mouse is over the pen label in the legend. E.g.: HighlightPens = true |
IntervalBetweenCursors | TimeSpan | Interval value between the primary and secondary cursors. E.g.: IntervalBetweenCursors = “00:10:00” |
IsExpanded | Digital | Checks if the current trend is expanded. E.g.: IsExpanded = false |
LabelsBrush | Text | Color of the labels. E.g.: LabelsBrush = “#FFFF00FF” |
LimitBrush | Text | This property fills the limit with the chosen color in Hexadecimal format. To make it work, you have to set the "LimitMaxValue" and/or "LimitMinValue". E.g.: LimitBrush = “#FFFF00FF”; |
LimitFillOpacity | Double | This property defines the limit opacity. The number goes from 0.0 to 1.0. By default, it is set to 0. To make it work, you have to set the "LimitMaxValue" and/or "LimitMinValue". E.g.: LimitFillOpacity = 0.5 |
LimitMaxValue | Double | This property will display a maximum horizontal line. To make it work, you have to choose the color using the property "LimitBrush". E.g.: LimitMaxValue = 85 |
LimitMinValue | Double | This property will display a minimum horizontal line. To make it work, you have to choose the color using the property "LimitBrush". E.g.: LimitMinValue = 22 |
MarkerTooltip | Digital | Shows the tooltip when the mouse is over the markers. E.g.: MarkerTooltip = false |
MergeSameYScales | Digital | Merges the same scaling values of the Y axis. E.g.: MergeSameYScales = true |
NavigationControls | Digital | Shows the navigation controls in the bottom of the trend object. E.g.: NavigationControls = false |
NextZoom | Digital | Enables the next zoom. E.g.: NextZoom = false |
OnlyZoomXAxis | Digital | Enables zoom only along the X axis. E.g.: OnlyZoomXAxis = false |
Orientation | Integer | Orientation of the trend drawing. 0 - Horizontal 1- Vertical, Top to Bottom 2- Vertical, Bottom To Top E.g.: Orientation = 0 |
Paused | Digital | Pauses the plotting of the trend object. E.g.: Paused = false |
SecondaryCursorBrush | Text | Color of the secondary cursor. E.g.: SecondaryCursorBrush = “#FFFF00FF” |
SecondaryCursorOutput | DateTime | Current X axis value for the secondary cursor. E.g.: SecondaryCursorOutput = “15/01/2019 11:30:00.000” |
SecondaryCursorOutputTooltip | Digital | Enables the secondary cursor output tooltip. E.g.: SecondaryCursorOutputTooltip = false |
SecondaryCursorPosition | Double | Position of the secondary cursor relative to the trend object area (percentage 0-100). E.g.: SecondaryCursorPosition = 0 |
SecondaryVerticalCursor | Digital | Enables the secondary vertical cursor. E.g.: SecondaryVerticalCursor = false |
ShowAlarms | Digital | Enable to show the alarm values in the trend chart area. E.g.: ShowAlarms = true |
ShowDuration | Integer | Enable to show the duration value in the vertical cursors. E.g.: ShowDuration = 0 |
ShowNoteDetails | Digital | Enable to show the note details in the trend chart area. E.g.: ShowNoteDetails = false |
ShowPrimaryCursorCloseButton | Digital | Enable to show the close button in the primary cursor. E.g.: ShowPrimaryCursorCloseButton = false |
ShowPrimaryCursorValues | Digital | Enable to show the pens value in the primary cursor. E.g.: ShowPrimaryCursorValues = false |
ShowRangeEvents | Digital | Enable to show the range events in the trend chart area. E.g.: ShowRangeEvents = true |
ShowRefreshButton | Digital | Enable to show the refresh button over the trend object. E.g.: ShowRefreshButton = false |
ShowSecondaryCursorCloseButton | Digital | Enable to show the close button in the secondary cursor. E.g.: ShowSecondaryCursorCloseButton = false |
ShowSecondaryCursorValues | Digital | Enable to show the pens value in the secondary cursor. E.g.: ShowSecondaryCursorValues = false |
ShowTagNotes | Digital | Enable to show the tag notes in the trend chart area. E.g.: ShowTagNotes = true |
ShowTimeNotes | Digital | Enable to show the time notes in the trend chart area. E.g.: ShowTimeNotes = true |
ShowXValueNotes | Digital | Enable to show X axis values in the trend chart area. E.g.: ShowXValueNotes = true |
StackPens | Digital | Enable the stack pens for Y axis. E.g.: StackPens = false |
StartDateTime | DateTime | Start date time of X axis. E.g.: StartDateTime = “15/01/2019 9:00:0.000” |
TimeBeforeNow | TimeSpan | Time value before the current time. E.g.: TimeBeforeNow = “02:00:00” |
VerticalCursor | Digital | Enable to show the primary vertical cursor. E.g.: VerticalCursor = true |
WindowBrush | Text | Color of the trend background window. E.g.: WindowBrush = “#FFFF00FF” |
XEndValue | DateTime | End value for the X axis. E.g.: XEndValue = “15/01/2019 11:00:0.000” |
XGridLines | Text | Number of grid lines for the X axis. E.g.: XGridLines = "4" |
XLabelDegrees | Double | Skew degree of the labels in the X axis. E.g.: XLabelDegrees = 0 |
XLabelFormat | Text | Format of the labels in the X axis. E.g.: XLabelFormat = "dd/MM/yy HH:mm:ss" |
XLabels | Text | Number of labels in the X axis. E.g.: XLabels = "2" |
XLabelsEditable | Digital | Enable the X labels for editing. E.g.: XLabelsEditable = false |
XPadding | Double | Space from the trend bottom to starting the chart area. E.g.: XPadding = 0 |
XStartValue | DateTime | Start value for the X axis. E.g.: “15/01/2019 9:00:0.000” |
YGridLines | Text | Number of grid lines for the Y axis. E.g.: YGridLines = "5" |
YLabelFormat | Text | Format of the labels in the Y axis. E.g.: YLabelFormat = “N1” |
YLabels | Text | Number of labels in the Y axis. E.g.: YLabels = "3" |
YLabelsEditable | Digital | Enables the Y labels for editing. E.g.: YLabelsEditable = true |
YMaxValue | Double | Maximum value for the Y axis. E.g.: YMaxValue = 100 |
YMinValue | Double | Minimum value for the Y axis. E.g.: YMinValue = 0 |
YPadding | Double | Starting position of the chart area from the trend left side. E.g.: YPadding = 0 |
StackPens Details
When more than one tag is being measured and the StackPens property is set to "true", the chart will turn into a stack chart-like visualization by dividing it in as many portions as measured tags. See image below for an example. Mouse over the image to see the property used.
Also, you can set the EnableYLabelsStackPensMode property to show YLabels subdivisions. See an example below. Mouse over the image to see the property used.
In this section: