Articles in this section
Category / Section

How to use a circular gauge control as a Quarter Gauge?

1 min read

This article explains you to design a Quarter Gauge using Circular Gauge.


Circular Gauge can be used Quarter Gauge for various scenarios and control can be customized accordingly.


The following screenshot displays the Quarter Gauge using circular gauge.


Quarter Gauge using SfCircularGauge



Import the SfGauge namespace as shown below,






  1. How to use CircularGauge as Quarter Gauge”


Create a Xamarin application and initialize SfCircularGauge control in it. Set Gauge type as NorthWest using GaugeType property in order achieve Quarter Gauge.





  <gauge:SfCircularGauge  GaugeType="NorthWest" BackgroundColor="Black" >
    <gauge:SfCircularGauge.Scales >
      <gauge:Scale x:Name="scale"  ShowLabels="false" StartValue="0" EndValue="100" Interval="10"  RimThickness="20" RimColor="Transparent" MinorTicksPerInterval="1">


Range can be used to know the percentage battery life.




    <gauge:Range  StartValue="0" Offset="0.15" EndValue="20" Thickness="30" Color="#3B3D3B" />
    <gauge:Range  StartValue="20" Offset="0.15" EndValue="70" Thickness="30" Color="#747673" />
    <gauge:Range  StartValue="70" Offset="0.15" EndValue="100" Thickness="30" Color="#C5C7C4" />


Add Needle Pointer to show current battery life




    <gauge:NeedlePointer Value="30" KnobRadius="50" Color="#FF6527"  Type="Triangle"
           Thickness="20" KnobColor="#FF6527"  LengthFactor="0.8"/>


Using Major and Minor Ticks, Quarter gauge can be customized in circular gauge



    <gauge:TickSettings Length="28" Color ="White" Thickness="5"/>
    <gauge:TickSettings  Length="18" Color ="White" Offset="0.05"  Thickness="5"/>


Finally, add header to indicate percentage value of battery, since header can be positioned as required.




    <gauge:Header Text="" Position="0.2,0.45" TextSize="45" ForegroundColor="White"/>





Output for the above code snippet-


Quarter Gauge using SfCircularGauge




SfCircularGauge type is determined by positioning the control towards particular direction. GaugeType is an enum property that provides the option to select type of the SfCircularGauge type

Please refer the following link for better understanding,


Output for the above code snippet for GaugeType as NorthEast-



Quarter Gauge using SfCircularGauge

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment