Skip to main content Link Menu Expand (external link) Document Search Copy Copied

ChartGauge

The ChartGauge provides a scrolling real-time chart of the selected attribute. Chart gauges can be overlaid on top of each other to produce a chart showing multiple attributes all in the same position. Where charts are overlaid, they are drawn in the order they appear in the XML definition. You can give each chart its own colour so that the various attributes can be differentiated.

Example

<gauge>
    <name>RPMGauge</name>
    <type>ChartGauge</type>
    <x>50</x>
    <y>20</y>
    <w>950</w>
    <h>450</h>
    <min>0</min>
    <max>7000</max>
    <initial>0</initial>
    <attribute>rpm</attribute>
    <colours>red</colours>
    <visible>1</visible>
    <opaque>1</opaque>
    <outline>1</outline>
    <showmarker>1</showmarker>
</gauge>

Attributes

Attribute Mandatory? Value Type Description
x Yes Integer The x coordinate of the bottom left of the chart
y Yes Integer The y coordinate of the bottom left of the chart
w Yes Integer The width of the chart
h Yes Integer The height of the chart
min Yes Integer The minimum value of the attribute the chart will display
max Yes Integer The maximum value of the attribute the chart will display. Min and Max are used to calculate the scale on the chart so that attribute being displayed has a discernible trace
initial Yes Integer The value to be used when there is no data for the attribute (this may be ignored, depending upon the attribute, but it is currently mandatory)
attribute Yes String The name of the data item you want to chart
colours Yes String The colour definition to use. See Colour Strings for more information
visible No Integer 1 or 0 Defines whether the gauge is initially visible or not
opaque No Integer 1 or 0 Default 0. Defines whether the chart should be drawn opaque or not. If set to 1, then the chart will be drawn with a solid black background. If 0 (default) then no background will be drawn and the chart line will appear over the top of whatever is behind it.
outline No Integer 1 or 0 Default 0. Defines whether an outline rectangle around the x,y,w,h coordinates should be drawn. If set to 1 then the outline will be drawn in the colour defined by the colours attribute.
showmarker No Integer 1 or 0 Default 0. Defines whether a vertical line should be displayed on the chart when a marker is requested using a touch action. The line will be scrolled off the screen in due course as the chart is updated.
updaterate No Integer Number of milliseconds between updates. Used to slow down a chart giving a longer term trend view. When not specified the chart is updated either every message (serial and playback datasources) or a fixed frequency (canbus datasource)