A line chart can be used to show trends or changes over time. Data points are connected by straight line segments. A line chart can also display several series of numbers.
A line chart can contain the following elements:
-
<Line>: Contains all elements that belong to the line chart. -
<Axis>: Defines the axis labels. -
<LineData>: Defines how the data is displayed. For each data set, i.e. each line in the line chart, a<LineData>element must be defined. -
<Tooltip>: Defines how the tooltip for the single values within the chart is displayed.
General Attributes
The following attributes are provided for all elements of a line chart:
|
Attribute |
Description |
|---|---|
|
|
Defines the font family.
Possible values:
|
|
|
Defines the font size.
Possible values:
|
|
|
Sets the width of the single characters.
This attribute overrides the default width of the characters of the Web App for this control. Possible values:
This attribute doesn't work with the
|
|
|
Defines the font style. This attribute overrides the default style of the characters of the Web App for this control. Possible values:
This attribute doesn't work with the
|
|
|
Defines the font weight. This attribute overrides the default font weight of the Web App for this control.
Possible values:
This attribute doesn't work with the
|
|
|
Defines the font color. This setting overwrites the default color of the color scheme! Possible values:
Do not use a hash in front of the color value! Do not use a shortened notation of the color value!
|
Line
<Line>: Contains all elements that belong to the line chart.
In addition to the general attributes, <Line> can have the following attributes:
|
Attribute |
Description |
|---|---|
|
|
Defines if a legend is displayed. Possible values: |
Axis
<Axis>: Child element of <Line>. Defines the axis labels.
In addition to the general attributes, <Axis> can have the following attributes:
|
Attribute |
Description |
|---|---|
|
|
Defines the axis color Possible values:
|
|
|
Defines the label of the x-axis. Possible values: Any string |
|
|
Maximum value of the x-axis Possible values: Integer |
|
|
Minimum value of the x-axis Possible values: Integer |
|
|
Unit of the x-axis Possible values: Integer |
|
|
Defines the label of the y-axis. Possible values: Any string |
|
|
Maximum value of the y-axis Possible values: Integer |
|
|
Minimum value of the y-axis Possible values: Integer |
|
|
Unit of the y-axis Possible values: Integer |
LineData
<LineData>: Child element of <Line>. Defines how the data is displayed. For each data set, i.e. each line in the line chart, a <LineData> element must be defined.
In addition to the general attributes, <LineData> can have the following attributes:
|
Attribute |
Description |
|---|---|
|
|
Defines the line color. Possible values: Hexadecimal color value or data binding expression (Color)
|
|
|
Defines which data is displayed in the diagram. Possible values: Data Binding |
|
|
Defines if the data points are labeled with the respective value. Possible values: |
|
|
Defines how a data point is displayed. Possible values:
|
|
|
Defines if a data point is marked. Possible values: |
|
|
Name of the data set that is displayed in the legend. Possible values: Any string |
|
|
Defines which data is displayed in the diagram on the x-axis. The specified string refers to a defined property within the data that is specified for Possible values: Data Binding |
|
|
Defines which data is displayed in the diagram on the y-axis. The specified string refers to a defined property within the data that is specified for Possible values: Data Binding |
Tooltip
<Tooltip>: Child element of <Line>. Defines how the tooltip for the single values within the chart is displayed.
For <Tooltip> the general attributes (see above) can be defined.
Examples
<Properties>
<Property name="DataSource" type="Complex">
<Property name="Profit" type="List">
<Property name="Years" type="Integer"/>
<Property name="Money" type="Integer"/>
</Property>
</Property>
</Properties>
<FlowLayout>
<Chart fontFamily="Font01" title="Profit over 25 Years">
<Line fontSize="medium" fontStyle="normal" fontFamily="Font02" fontWeight="Black" foreground="A700" legend="true">
<Tooltip fontFamily="Font01" fontSize="30"/>
<Axis fontFamily="Font03" horizontalLabel="Years" verticalLabel="Euro"/>
<LineData data="#DataSource.Profit" labels="true" name="Profit" xValues="#Years" yValues="#Money"/>
</Line>
</Chart>
</FlowLayout>
<Property name="Datasource" type="Complex">
<Property name="LineDataSet1" type="List">
<Property name="xValue" type="Integer"/>
<Property name="yValue" type="Integer"/>
</Property>
<Property name="LineDataSet2" type="List">
<Property name="xValue" type="Integer"/>
<Property name="yValue" type="Integer"/>
</Property>
</Property>
...
<Chart title="Some data">
<Line>
<Axis horizontalLabel="D, mm" verticalLabel="L, s" />
<LineData data="#Datasource.LineDataSet1" xValues="#xValue"
yValues="#yValue" name="Series 1" marker="diamond" labels="true" />
<LineData data="#Datasource.LineDataSet2" xValues="#xValue"
yValues="#yValue" name="Series 2" marker="pin" />
</Line>
</Chart>
The element <LineData> is used to display a line in the diagram. The displayed data itself is contained in the property Datasource. In the above example, the data is retrieved using the data binding expression #Datasource.LineDataSet1. The above example leads to the following diagram: