# Charts

The Charts elements are used to display data from a project in a Bar Chart, Pie Chart or Trend Chart.

The Bar, Pie and Trend Charts share the following Properties:

- Content Property

  This is used to pass the data that will be used to chart. The property must be set to a DataSet Data Type, either through binding the Content property to a DataSet tag or WebPage Elements Event Handler Scripts. When the data is updated, the chart will be re-evaluated and redrawn.

  Note: See the topic WebPages HMI Scripting for information regarding the differences between using the DataSet as a tag or as an Event Handler script.

- Show Legends

  Determines whether or not the chart legends will be displayed with the chart. When enabled (by default it is enabled), while the project is in deployed mode, if a user hovers over the chart with a mouse, the legend will display information about the chart in relation to the placement of the mouse, as shown below.

  Chart in deployed mode

- Visible Columns

  Determines which columns will be displayed in the chart. By leaving this property blank, all the available columns in the DataSet will be displayed by default.

  To select specific columns to be displayed, enter the column name. If adding multiple columns, a semicolon must be placed between each column name (e.g. X ; Y ; Height ; Width).

Chart | Description
--- | ---
Bar | The Bar Chart is used to display comparisons between categories of data. The Bar Chart includes the following Chart specific Properties:
Property | Description
--- | ---
X Axis Column | Specifies the X axis column name (as a String data type) by referencing a column of the DataSet that should be used as the X axis markers. Enter the name of the column from the referenced DataSet. When a column of the DataSet is configured as the X axis, that column will no longer be a part of the chart data. Note: If a name is not specified, a series of numbers will be generated.
X Axis Label | Specifies a descriptive name that will be displayed on the chart's X axis.
X Axis Label Visible | Specifies whether or not the X Axis Label is displayed. This property value is a Boolean data type.
Y Axis Label | Specifies a descriptive name that will be displayed on the chart's Y axis.
Y Axis Label Visible | Specifies whether or not the Y Axis Label is displayed. This property value is a Boolean data type.
Y Range Max | Specifies the maximum value (as a Double data type) for the chart's range. This property allows you to restrict the visible range of the chart, even if some of the values may not fall within the range defined by the Max and Min values.
Y Range Max Enabled | Specifies whether or not the Y Range Max property value (Boolean data type) is used to establish the maximum limitation for the chart. When it is enabled (by default, it is disabled), the Y range maximum will be established by the Y Range Max property value. Note: If either of the Y Range Max Enabled or Y Range Min Enabled properties are enabled, the Y Range Max and Y Range Min property values will be used.
Y Range Min | Specifies the minimum value (as a Double data type) for the chart's range. This property allows you to restrict the visible range of the chart, even if some of the values may not fall within the range defined by the Max and Min values.
Y Range Min Enabled | Specifies whether or not the Y Range Min property value (Boolean data type) is used to establish the minimum limitation for the chart. When it is enabled (by default, it is disabled), the Y range minimum will be established by the Y Range Min property value. Note: If either of the Y Range Max Enabled or Y Range Min Enabled properties are enabled, the Y Range Max and Y Range Min property values will be used.
Pie | The Pie Chart is used to display a numerical proportions of data in a circular representation. The values in the Pie Chart are aggregated values of referenced DataSet columns; it presents a visual representation of the ratio between values. The values are generated by adding and summing all the items in a DataSet column, and then presenting a ratio of those values. The Pie Chart only includes the two common Chart Properties, Show Legends and Visible Columns.
Trend | The Trend Chart is used to display trends in data over time. The Trend Chart includes the following Chart specific Properties:
Property | Description
--- | ---
Enable Lower Region | Specifies whether or not the lower boundary in the chart is enabled (this property value is a Boolean data type). This can be useful to visually determine a range of values that are incorrect.
Enable Upper Region | Specifies whether or not the upper boundary in the chart is enabled (this property value is a Boolean data type). This can be useful to visually determine a range of values that are incorrect.
High Region Divider Caption | Specifies a description (as a String data type) that will appear on the Upper Region of the chart; by default, it is set to "Perfect Score"). This can be useful to describe what the values falling in this range represent.
Lines Enabled | Specifies whether or not the lines for the Lower Region and Upper Region will be drawn on the chart (this property value is a Boolean data type). This also controls whether or not the captions will be displayed, and the center line will be drawn.
Low Region Divider Caption | Specifies a description (as a String data type) that will appear on the Lower Region of the chart; by default, it is set to "0 Score"). This can be useful to describe what the values falling in this range represent.
Lower Bound | Specifies the value (as a Double data type) that defines the low range of the chart begins.
Upper Bound | Specifies the value (as a Double data type) that defines the high range of the chart begins.
X Axis Column | Specifies the X axis column name (as a String data type) by referencing a column of the DataSet that should be used as the X axis markers. Enter the name of the column from the referenced DataSet. When a column of the DataSet is configured as the X axis, that column will no longer be a part of the chart data. Note: If a name is not specified, a series of numbers will be generated.
X Axis Label | Specifies a descriptive name that will be displayed on the chart's X axis.
X Axis Label Visible | Specifies whether or not the X Axis Label is displayed. This property value is a Boolean data type.
Y Axis Label | Specifies a descriptive name that will be displayed on the chart's Y axis.
Y Axis Label Visible | Specifies whether or not the Y Axis Label is displayed. This property value is a Boolean data type.
Y Range Max | Specifies the maximum value (as a Double data type) for the chart's range. This property allows you to restrict the visible range of the chart, even if some of the values may not fall within the range defined by the Max and Min values.
Y Range Max Enabled | Specifies whether or not the Y Range Max property value (Boolean data type) is used to establish the maximum limitation for the chart. When it is enabled (by default, it is disabled), the Y range maximum will be established by the Y Range Max property value. Note: If either of the Y Range Max Enabled or Y Range Min Enabled properties are enabled, the Y Range Max and Y Range Min property values will be used.
Y Range Min | Specifies the minimum value (as a Double data type) for the chart's range. This property allows you to restrict the visible range of the chart, even if some of the values may not fall within the range defined by the Max and Min values.
Y Range Min Enabled | Specifies whether or not the Y Range Min property value (Boolean data type) is used to establish the minimum limitation for the chart. When it is enabled (by default, it is disabled), the Y range minimum will be established by the Y Range Min property value. Note: If either of the Y Range Max Enabled or Y Range Min Enabled properties are enabled, the Y Range Max and Y Range Min property values will be used.