Skip to content

Latest commit

 

History

History
196 lines (116 loc) · 5.16 KB

File metadata and controls

196 lines (116 loc) · 5.16 KB

Cairo Gauge Donut

Requires Cairo to be installed

Shows a gauge which is some sector of a donut..

Any supported metric or unit can be used

<component type="cairo-gauge-donut" metric="speed" units="mph" />

06-cairo-gauge-donut-0.png

Size

Use size to change the size.

Max and Min Values

Use max and min to set maximum and minimum values.

<component type="cairo-gauge-donut" metric="speed" units="mph"  />

06-cairo-gauge-donut-1.png

Rotation and Length

The gauge by default starts at the bottom left, this can be changed using start, which is the number of degrees to rotate clockwise. The default start is 143.

<component type="cairo-gauge-donut" metric="speed" units="mph"  start="270"/>

06-cairo-gauge-donut-2.png

The gauge is normally 254 degrees "long". This can be changed using length

<component type="cairo-gauge-donut" metric="speed" units="mph"  length="90" />

06-cairo-gauge-donut-3.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  length="180" />

06-cairo-gauge-donut-4.png

You can use -ve length to make the gauge draw anti-clockwise

<component type="cairo-gauge-donut" metric="speed" units="mph"  length="-90" />

06-cairo-gauge-donut-5.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  length="-180" />

06-cairo-gauge-donut-6.png

Number of Ticks / Sectors

There are 5 sectors by default. This can be changed with sectors

<component type="cairo-gauge-donut" metric="speed" units="mph"  length="90" sectors="20" />

06-cairo-gauge-donut-7.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  length="180" sectors="6" />

06-cairo-gauge-donut-8.png

Range Markers

You can set range markers, like thecairo-gauge-arc-annotated widget.

<component type="cairo-gauge-donut" metric="speed" units="mph"  length="180" sectors="6" max="60" arc-value-upper="60" arc-value-lower="50" arc-inner-rgb="255,0,255,50" arc-outer-rgb="255,0,0,250" />

06-cairo-gauge-donut-9.png

Colours

Various colours can be set, either as RGB, or RGBA values.

The following are available to change: background-inner-rgb, background-outer-rgb, major-ann-rgb, minor-ann-rgb, needle-rgb, major-tick-rgb, minor-tick-rgb, arc-inner-rgb, arc-outer-rgb

<component type="cairo-gauge-donut" metric="speed" units="mph"  background-inner-rgb="255,0,0"/>

06-cairo-gauge-donut-10.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  background-outer-rgb="0,255,0"/>

06-cairo-gauge-donut-11.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  major-ann-rgb="255,0,0"/>

06-cairo-gauge-donut-12.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  minor-ann-rgb="255,0,0"/>

06-cairo-gauge-donut-13.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  major-tick-rgb="255,0,0"/>

06-cairo-gauge-donut-14.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  minor-tick-rgb="255,0,0"/>

06-cairo-gauge-donut-15.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  needle-rgb="255,0,255"/>

06-cairo-gauge-donut-16.png

Transparency

Any colour that is completely transparent will disappear... this can be used to change the appearance of the widget quite a bit.

<component type="cairo-gauge-donut" metric="speed" units="mph"  background-inner-rgb="255,0,0,0"/>

06-cairo-gauge-donut-17.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  major-ann-rgb="255,0,0,0"/>

06-cairo-gauge-donut-18.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  minor-ann-rgb="255,0,0,0"/>

06-cairo-gauge-donut-19.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  major-tick-rgb="255,0,0,0"/>

06-cairo-gauge-donut-20.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  minor-tick-rgb="255,0,0,0"/>

06-cairo-gauge-donut-21.png

<component type="cairo-gauge-donut" metric="speed" units="mph"  needle-rgb="255,0,255,40"/>

06-cairo-gauge-donut-22.png