Xamarin android SfCircularGauge problem with GaugeType

Hello. I my xamarin android app I am trying to have SfCircularGauge. Until with point I have problem. The problem is that I wanna display only the North part of the Gauge. I tried this with StartAngle = 180; and SweepAngle = 180; but the graph is displaying empty place in the South part of the Gauge. After online searching I found a way to avoid the empty South part of the graph using CircularGauge.GaugeType = GaugeType.North; But when I am using this line I have no the empty South part but the gauge is losing all the styles. What I have to do to have only the North part of the Gauge without South empty space. I attached a rar file with two image. One is my output without using the GaugeType  and one with y output when I am using GaugeType. Thank you very much for your time.

This is the code 

            SfCircularGauge CircularGauge = new SfCircularGauge(Activity);
            ObservableCollection<CircularScale> Scales = new ObservableCollection<CircularScale>();
            CircularScale Scale = new CircularScale();

            CircularGauge.GaugeType = GaugeType.North;
            
            Scale.StartValue = 0;
            Scale.EndValue = 100;
            Scale.ShowTicks = false;
            Scale.StartAngle = 180;
            Scale.SweepAngle = 180;
            Scale.ShowLabels = false;
         
            CircularGauge.SetPadding(0, 25, 0, 0);
            CircularRange Range = new CircularRange();
            Range.StartValue = 0;
            Range.EndValue = 100;
            Range.Width = 13;
            Range.Offset = 1;
            Scale.CircularRanges.Add(Range);
            ObservableCollection<GaugeGradientStop> gradientColor1 = new ObservableCollection<GaugeGradientStop>();
            GaugeGradientStop gaugeGradientStop = new GaugeGradientStop();
            gaugeGradientStop.Value = 0;
            gaugeGradientStop.Color = Color.WhiteSmoke;
            gradientColor1.Add(gaugeGradientStop);
            GaugeGradientStop gaugeGradientStop1 = new GaugeGradientStop();e
            gaugeGradientStop1.Value = 50;
            gaugeGradientStop1.Color = Color.Olive;
            gradientColor1.Add(gaugeGradientStop1);
            Range.GradientStops = gradientColor1;
            Scales.Add(Scale);
            CircularGauge.CircularScales = Scales;
            grapg.AddView(CircularGauge);




Attachment: GaugeImages_2f2f83d1.rar

3 Replies

SG Sri Gayathri Gopalakrishnan Syncfusion Team May 22, 2018 12:41 PM UTC

 
Query: Xamarin android SfCircularGauge problem with GaugeType 
 
We have analyzed your query, GaugeType property has been deprecated from the version 16.1.0.24 and can use StartAngle and SweepAngle Property for gauge type requirement. To achieve your scenario, we have adjusted the CircularGauge position by setting Padding to the Layout. We have prepared the sample based on this and please download the sample from the below link, 
 
 
Screenshot: 
  
 
  
Regards, 
Sri Gayathri. G 
 
  
  



KE Konstantinos Evangelidis May 25, 2018 02:22 PM UTC

Hello and thank you for your answer. The problem still remains. I don't want to move the gauge to the Bottom. I want to get rib of the bottom empty space to make the width of the gauge bigger.


SG Sri Gayathri Gopalakrishnan Syncfusion Team May 28, 2018 12:59 PM UTC

Hi Konstantinos, 
 
Query: Xamarin android SfCircularGauge problem with GaugeType 
 
Based on your reported query, Gradients are not applied if GaugeType  North is set. We have logged defect report regarding the same. The patch for the fix will be included in our upcoming vol 2 sp1 release which is expected to be rolled out by the end of June 2018. 
 
We appreciate your patience until then. 
 
Regards, 
Sri Gayathri. G 


Loader.
Up arrow icon