Skip to main content

Linear gauge chart

info

Charts are available with Avalonia Pro.

Linear gauge charts visualize a value along a horizontal or vertical bar. They are suited to comparing metrics side by side or showing progress in a linear, space-efficient format.

Linear gauge chart with a horizontal progress bar and scale ticks showing the current value along a numeric range.

When to use

  • Performance bars: Comparing multiple metrics in a condensed dashboard.
  • Volume indicators: Showing storage levels, audio levels, or tank capacity.
  • Progress tracking: Visualizing a sequence of targets in a straight line.

Code example

XAML

<StackPanel Spacing="15" Margin="10">
<charts:LinearGaugeChart Title="Temperature" Value="72" MinValue="0" MaxValue="100" Height="60"
NeedleBrush="#F44336">
<charts:LinearGaugeChart.ValueBrush>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Offset="0" Color="#4CAF50" />
<GradientStop Offset="0.5" Color="#FFEB3B" />
<GradientStop Offset="1" Color="#F44336" />
</LinearGradientBrush>
</charts:LinearGaugeChart.ValueBrush>
</charts:LinearGaugeChart>

<charts:LinearGaugeChart Title="Humidity" Value="45" MinValue="0" MaxValue="100" Height="60"
NeedleBrush="#00BCD4">
<charts:LinearGaugeChart.ValueBrush>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Offset="0" Color="#2196F3" />
<GradientStop Offset="1" Color="#00BCD4" />
</LinearGradientBrush>
</charts:LinearGaugeChart.ValueBrush>
</charts:LinearGaugeChart>

<charts:LinearGaugeChart Title="Pressure" Value="88" MinValue="0" MaxValue="100" Height="60"
NeedleBrush="#E91E63">
<charts:LinearGaugeChart.ValueBrush>
<LinearGradientBrush StartPoint="0%,0%" EndPoint="100%,0%">
<GradientStop Offset="0" Color="#9C27B0" />
<GradientStop Offset="1" Color="#E91E63" />
</LinearGradientBrush>
</charts:LinearGaugeChart.ValueBrush>
</charts:LinearGaugeChart>
</StackPanel>

Common properties

PropertyDescriptionDefault
ValueThe current value to display.50.0
MinValueMinimum value of the scale.0.0
MaxValueMaximum value of the scale.100.0
OrientationOrientation of the gauge, Horizontal or Vertical.Horizontal
ShowScaleWhether to display the scale.true
TrackBrushColor of the track.Uses theme default.
NeedleBrushColor of the needle indicator.Uses theme default.
ValueBrushColor of the value.Uses theme default.
TrackThicknessThickness of the track.20.0
RangesOptional collection of colored ranges drawn behind the indicator.null
ShowMajorTicksWhether to display major ticks.false
ShowMinorTicksWhether to display minor ticks.false
MajorTickIntervalInterval between major ticks.20.0
MinorTickCountNumber of minor ticks between two major ticks.4