X4 Produktdokumentation

Chart

<Chart> controls can be used to integrate the following charts into a Web App:

  • Bar chart

  • Tachograph

  • Line chart

  • Pie/donut chart

Instructions for use

A <Chart> control is created with the <Chart> element.

XML
<Chart>
...
</Chart>

All charts must be filled using data binding.

Attribute

Note:

There are a number of default attributes that can be set for all controls. For more information about the default attributes, see Default attributes.

In addition to the default attributes, you can define the following attributes for <Chart> controls.

Attribute

Description

minHeight

Minimum chart height

Possible values: Integer

Note:

If the minHeight attribute is not explicitly set, charts are displayed with a height of 400 pixels.

saveAsImage

Allows you to download the chart as an image file in SVG format.

Possible values:

  • Any string: Specifies the file name.

  • TIMESTAMP: File name consists of the string Chart_ and a timestamp

subtitle

Subtitle of the chart

Possible values:

  • Any string

  • Expression for data binding

title

Title of the chart

Possible values:

  • Any string

  • Expression for data binding

Note

The charts are optimized for size values in pixels. If an explicit definition of the height and width of the chart is required, the units attribute should first be set to pixels.