Applying Visualization Styles

A visualization style is a collection of colors, fonts, images, and any values that are defined as style properties. When designing a visualization element, you can use these style properties only. Then you have a uniform, style-dependent appearance.

An element that applies style colors and style fonts behaves according to the selected style design in each selected style. In this way, a style property, such as Element basic color, can be blue In one style and gray in another style. In contrast, if the color of an element has a fixed value, this color is fixed even when the style is switched.

All applicable styles are consistent because they define a fixed set of style properties. Therefore, you can switch smoothly between styles in order to customize your visualization. You can preview a style to get an impression of how it behaves.

(Undefined variable: docInfo_EN.FreieVariable_4) provides different styles, for example the styles Flat style or White Style.

These provided styles are installed in the Visualization Style Repository.

If you do not like the available styles, then you can create your own. The easiest way to do this is to use an existing style as a base.

For more information, see: Entries in the Visualization Style

The selected style that applies to all visualizations in the application is set in the Visualization Manager object (Settings tab, Style Settings group, Selected style). In addition, the Properties view provides its style properties when designing an element. For each element, you can assign these styles instead of fixed values.

The style is applied to all visualizations that are below an application. The settings of the Options – Visualization Styles dialog are also considered for a library visualization or a visualization in the POU view.

Designing a visualization element with style properties

The set style includes style properties. These are provided in the Properties view of an element in the list box of the Value column. It is checked which style properties are appropriate for which property. For example, only style properties with color definitions are available for a color assignment.

[Tip] Tip

A style can have directly defined visualization element properties. If this style is used in the project, then these properties are not configurable anymore.

Requirement: A project with a visualization is open.

  1. Double-click the visualization.

  2. Select an element.

  3. Click View → Element Properties.

  4. In the Properties view, in the Colors category, click in the input field of a color.

    The list box opens with style properties. The style colors are based on the currently selected style.

  5. Select a style property.

    The visualization shows the element according to the style.

Example 30. Example

A visualization uses the style CompanyStyle8, which defines the colors CompanyRed, CompanyBlue, and CompanyGreen. An element is selected in the visualization. You can configure the element in the Properties view. By clicking into the value field of the Color property, you receive a list box with the entries CompanyRed, CompanyBlue, and CompanyGreen.


Switching visualization styles

When setting a style in the Visualization Manager, all complete styles in the repository are available for selection. It does not matter and it is not evident if a style have been derived from another style.

You can preview a style to get an impression of how it behaves.

How a visualization implements a style at runtime also depends on the display variant. For example, if a font that is defined in the style is not available, the display variant shows the visualization with a preset font.

Requirement: A project with a visualization is open.

  1. Double-click the Visualization Manager object in the device tree.

    The editor opens.

  2. On the Settings tab, in the Style Settings group, click in the input field of Selected style.

    All styles that are installed in the repository are listed.

  3. Mouse over a style.

    A preview of how the style is displayed appears in a new window.

  4. Select a style.

    The style is applied. The preview in Style Settings shows the new setting.

  5. Double-click a visualization.

    The visualization appears in the new style.

Update version

Requirement: A project with a visualization is open.

  1. In Project → Project Environment, click the Visualization Styles tab.

    (Undefined variable: docInfo_EN.FreieVariable_4) lists all new versions of the currently used styles.

  2. Click Set All to Newest.

    The style is updated. Visualizations and their elements apply the new style.