Rim

3 Sep 20205 minutes to read

Scale determines the structure of a circular gauge by using the circular rim. By setting the StartAngle and SweepAngle properties, you can change the shape of the circular gauge into a full circular gauge, half circular gauge, or quarter circular gauge.

The StartValue and EndValue properties will determine the overall range of the circular rim.

  • c#
  • SfCircularGauge circularGauge = new SfCircularGauge(this);
                ObservableCollection<CircularScale> scales = new ObservableCollection<CircularScale>();
                CircularScale scale = new CircularScale();
                scale.StartAngle = 270;
                scale.SweepAngle = 360;
                scale.StartValue = 0;
                scale.EndValue = 360;
                scale.Interval = 20;
                scale.MinorTicksPerInterval = 0;
                scale.ShowFirstLabel = false;
                circularGauge.CircularScales.Add(scale);

    Rim customization

    The color and thickness of rim can be set by using the RimColor and RimWidth properties. To increase the RimWidth, set the RadiusFactor.

  • c#
  • SfCircularGauge circularGauge = new SfCircularGauge(this);
                ObservableCollection<CircularScale> scales = new ObservableCollection<CircularScale>();
                CircularScale scale = new CircularScale();   
                scale.StartValue = 0;
                scale.EndValue = 100;
                scale.RadiusFactor = 1;
                scale.RimWidth = 40;
                scale.LabelOffset = 0.6;
                scale.MajorTickSettings.Offset = 0.8;
                scale.MinorTickSettings.Offset = 0.8;
                scale.RimColor = Color.SkyBlue;
                circularGauge.CircularScales.Add(scale);

    Setting position for rim

    You can customize the position of CircularScales in the following two ways:

    1. RadiusFactor with the RimWidth property.
    2. The ScaleStartOffset and ScaleEndOffset properties.

    Setting radius factor for rim

  • c#
  • SfCircularGauge circularGauge = new SfCircularGauge(this);
                ObservableCollection<CircularScale> scales = new ObservableCollection<CircularScale>();
                CircularScale scale = new CircularScale();   
                scale.StartValue = 0;
                scale.EndValue = 100;
                scale.RadiusFactor = 0.7;
                scale.RimWidth = 30;
                circularGauge.CircularScales.Add(scale);

    Setting scale start and end offsets for rim

  • c#
  • SfCircularGauge circularGauge = new SfCircularGauge(this);
                ObservableCollection<CircularScale> scales = new ObservableCollection<CircularScale>();
                CircularScale scale = new CircularScale();   
                scale.StartValue = 0;
                scale.EndValue = 100;
                scale.ScaleStartOffset = 0.6;
                scale.ScaleEndOffset = 0.7;
                circularGauge.CircularScales.Add(scale);

    Show rim

    The ShowRim property is a Boolean property, which is used to enable or disable the rim in circular gauge.

  • c#
  • SfCircularGauge circularGauge = new SfCircularGauge(this);
                ObservableCollection<CircularScale> scales = new ObservableCollection<CircularScale>();
                CircularScale scale = new CircularScale();   
                scale.StartValue = 0;
                scale.EndValue = 100;
                scale.ShowRim = false;
                circularGauge.CircularScales.Add(scale);