PieChart

Pie chart for displaying multiple values.

Symbol

Menu ribbon

Start > Controls > Input/output > Variable output > PieChart

The "PieChart" control element displays variable values as segments of a ring. In order to visualise the respective share of a value in the total value of all values considered, the individual segments are displayed in different colours. In addition to the actual diagram, the PieChart can display a legend to describe the individual segments.

Example: The PieChart can be used, for example, to show how often certain alarms occur in comparison to the total frequency of all alarms or how long certain alarms are active in comparison to the total duration of all alarms.

PieChart with three segments

Functionalities

The control element supports the following functionality:

You can configure these functionalities via the properties in the Properties window when you select the control in the Designer or in the document outline.

Style

There are no system styles available for the control. You can create your own styles for the control. These styles are available for selection in the "Style" property after creation.

Structure

Internally, the PieChart consists of two main elements: the "PieCore", which contains a graphic (SVG) that draws a ring of defined segments, and the "PieLegend", which represents the legend for the graphic.

The PieChart and its elements

Ring diagram

The control element contains a graphic (SVG) that represents a ring. The PieChart can only be used effectively if at least two segments have been configured. In addition, the following can be configured for the ring diagram via properties in the "PieChart" category:

Segment (PieSegment)

To display variable values as segments in the ring, a "PieSegment" element must be added to the PieChart for each variable. The PieChart contains a PieSegment by default.

To add PieSegments or remove existing ones, open the Collection Editorvia the button behind the "Segments" property.

The PieSegment supports the following functionality::

The following can also be configured for the display of the element:

Legend (PieLegend)

The legend (PieLegend) creates an entry for each new PieSegment(FlexLayout). This contains a ColorIndicator and a NumericVarOut. The colour configured in the "FillColor" property of a PieSegment is used both for the PieSegment and for the corresponding ColorIndicator. The labelling, the unit and the value of a PieSegment are also displayed in the corresponding NumericVarOut.

The "ShowLegend" property is used to specify whether the legend should be displayed. The following can also be configured for the legend via the properties of the "Legend" category:

LegendPosition

Defines the position of the legend and the ring diagram within the control element. The name for the setting (Left, Top, Right, Bottom) refers to the position of the legend relative to the ring diagram.

Position of the legend (2) and the ring diagram (1) with LegendAlignment=Centre

LegendAlignment

Defines the alignment of the legend and the ring diagram. The property is perpendicular to the "LegendPosition" setting:

Related topics: