GaugeMarker
A line, with an optional label, that marks a single value on the arc of a
GaugeChart, such as a threshold or a target.
Markers are positioned like ticks, but each one sits at its own value
instead of being spaced evenly. They are drawn over the ticks and under the
pointers.
Properties
alignment- Where the line sits relative to the point it marks on the arc.color- The color of the line.label- The text drawn next to the line.label_offset- The distance, in logical pixels, between the end of the line and thelabel.label_side- Which side of the line thelabelsits on.label_style- The text style of thelabel.length- The length of the line, in logical pixels.offset- The distance, in logical pixels, by which this marker is moved from itsposition.position- Where this marker sits relative to the rings.stroke_cap- The shape of the ends of the line.thickness- The thickness of the line, in logical pixels.value- The value on the gauge's scale this marker sits at.
Properties
alignmentclass-attributeinstance-attribute
alignment: GaugeMarkerAlignment = (
GaugeMarkerAlignment.CENTERED
)Where the line sits relative to the point it marks on the arc.
colorclass-attributeinstance-attribute
color: ColorValue | None = NoneThe color of the line.
Defaults to ColorScheme.on_surface.
labelclass-attributeinstance-attribute
label: str | None = NoneThe text drawn next to the line.
On the left half of the gauge, the label is turned by 180 degrees so that it stays upright.
Only the line is taken into account when the rings shrink to leave room
for markers at GaugeTickPosition.OUTER. To keep an
outward label from being clipped, increase offset.
label_offsetclass-attributeinstance-attribute
label_offset: Number = 6.0The distance, in logical pixels, between the end of the line and the
label.
Raises:
- ValueError - If it is not greater than or equal to
0.
label_sideclass-attributeinstance-attribute
label_side: GaugeMarkerLabelSide = (
GaugeMarkerLabelSide.OUTWARD
)Which side of the line the label sits on.
label_styleclass-attributeinstance-attribute
label_style: TextStyle | None = NoneThe text style of the label.
Defaults to 12-pixel text in the marker's color.
lengthclass-attributeinstance-attribute
length: Number = 10.0The length of the line, in logical pixels.
Raises:
- ValueError - If it is not strictly greater than
0.
offsetclass-attributeinstance-attribute
offset: Number = 0The distance, in logical pixels, by which this marker is moved from its
position.
It follows the same rules as GaugeTicks.offset.
positionclass-attributeinstance-attribute
position: GaugeTickPosition = GaugeTickPosition.OUTERWhere this marker sits relative to the rings.
stroke_capclass-attributeinstance-attribute
stroke_cap: StrokeCap = StrokeCap.ROUNDThe shape of the ends of the line.
thicknessclass-attributeinstance-attribute
thickness: Number = 2.0The thickness of the line, in logical pixels.
Raises:
- ValueError - If it is not strictly greater than
0.
valueinstance-attribute
value: NumberThe value on the gauge's scale this marker sits at.
A value outside GaugeChart.min_value and
GaugeChart.max_value places the marker past the ends of the
arc.