i'm add Syncfusion.SfGauge.XForms to reference
but i cannot see gauge
code:
SfCircularGauge circularGauge = new SfCircularGauge();
InitializeComponent();
if (Device.OS == TargetPlatform.iOS)
{
circularGauge.HeightRequest = 200;
}
else
{
circularGauge.VerticalOptions = LayoutOptions.FillAndExpand;
}
ObservableCollection<Scale> Scales = new ObservableCollection<Scale>();
Scale scale = new Scale();
scale.StartValue = 0;
scale.EndValue = 100;
scale.StartAngle = 180;
scale.SweepAngle = 180;
scale.RimThickness = 40;
scale.RimColor = Color.FromRgb(86, 86, 86);
NeedlePointer pointer = new NeedlePointer();
pointer.Value = 70;
pointer.Thickness = 5;
pointer.KnobRadius = 20;
pointer.LengthFactor = Device.OnPlatform(1, 1, 1);
pointer.Color = Color.FromRgb(226, 226, 226);
pointer.KnobColor = Color.FromHex("#FFE2E2E2");
RangePointer rPointer = new RangePointer();
rPointer.Value = 70;
rPointer.Color = Color.FromHex("#FF00B2DB");
rPointer.Thickness = 40;
List<Pointer> pointers = new List<Pointer>();
pointers.Add(pointer);
pointers.Add(rPointer);
scale.Pointers = pointers;
scale.ShowTicks = false;
scale.ShowLabels = false;
Scales.Add(scale);
circularGauge.Scales = Scales;
circularGauge.GaugeType = GaugeType.North;
Content = circularGauge;
}