HorizontalGauge

HorizontalGauge displays a horizontal bar chart using the value of the specified attribute and the limits supplied to calculate the height of the bar.

Example:

<gauge>
    <name>t350temp</name>
    <type>HorizontalGauge</type>
    <x>549</x>
    <y>50</y>
    <w>160</w>
    <h>27</h>
    <min>0</min>
    <max>180</max>
    <initial>0</initial>
    <attribute>clt</attribute>
    <visible>1</visible>
    <colours>redred</colours>
    <outline>0</outline>
    <image>t350barchart.bmp</image>
    <blocksize>20</blocksize>
    <yscale>-1</yscale>
</gauge>
Attribute Mandatory? Value Type Description
x Yes Integer The x coordinate of the bottom left of the gauge
y Yes Integer The y coordinate of the bottom left of the gauge
w Yes Integer The width of the bar chart in pixels
h Yes Integer The height of the bar chart in pixels
min Yes Integer The minimum value of the attribute. This is used to set the zero width of the bar.
max Yes Integer The maximum value of the attribute. This is used to set the full width position of the bar.
initial Yes Integer The initial value to be used before any data is received from the ECU. In reality you will probably never see this value unless you have incorrectly specified the attribute.
attribute Yes String The name of the attribute you want to base the gauge on
visible No Integer 1 or 0 Defines whether the bar is shown when the page is first loaded.
outline No Integer 1 or 0 Defines whether an outline rectangle should be drawn (with dimensions x,y,w,h) as well as the calculated bar width. Ignored if the “image” attribute is defined
alpha No Integer 0 to 255 Defines the opacity of the drawn bar, provided an image is not being used
colours No String Specifies the colour of the bar. See the colour definitions page for further details
colours_script No String Defines a script that can be used for determining the colour. For example, you might want a temperature bar to go red if the the temperature goes above a certain value. If the colours_script is defined, then the colours attribute is ignored
blocksize No Integer The block size enables the bar chart to be split into chunks of pixels. This reduces its resolution so it doesn’t move around with small changes in the attribute’s value. Typically this is used for emulating older style displays that used LCD segments to light up bars in blocks. For example, a 200 pixel high bar with a block size of 20 would have 10 segments. The block size is typically used in conjunction with the background attribute to enable an image to be revealed in blocks, allowing a more accurate looking display than simply drawing a rectangle of a calculated height.
image No String Name of the image that is to be used as the bar, instead of drawing rectangles.
xscale No Float Scales the gauge width. Only useful if you are using an image and blocksize to draw the gauge
yscale No Float Scales the gauge height. Only useful if you are using an image and blocksize to draw the gauge
rotation No Integer Specifies a rotation angle for the gauge. You can make a horizontal gauge into a vertical gauge by rotating by 90 degrees.
shearx No Float Specifies shearing in the x direction. This produces an italic effect. Negative values are allowed
sheary No Float Specifies shearing in the y direction. Negative values are allowed.