The Content property will add the content to the Range Selector. Add any control within the Range Selector with this property. In most cases, the Charts will be added as a content.
XAML
<ContentPage
...
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:charts="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
xmlns:local="clr-namespace:SliderTestbedSample.RangeSelector">
<ContentPage.BindingContext>
<local:ViewModel />
</ContentPage.BindingContext>
<sliders:SfRangeSelector Minimum="10"
Maximum="20"
RangeStart="13"
RangeEnd="17">
<charts:SfCartesianChart>
<charts:SfCartesianChart.XAxes>
<charts:DateTimeAxis IsVisible="False"
ShowMajorGridLines="False" />
</charts:SfCartesianChart.XAxes>
<charts:SfCartesianChart.YAxes>
<charts:NumericalAxis IsVisible="False"
ShowMajorGridLines="False" />
</charts:SfCartesianChart.YAxes>
<charts:SfCartesianChart.Series>
<charts:SplineAreaSeries ItemsSource="{Binding Source}"
XBindingPath="X"
YBindingPath="Y">
</charts:SplineAreaSeries>
</charts:SfCartesianChart.Series>
</charts:SfCartesianChart>
</sliders:SfRangeSelector>
</ContentPage>
C#
SfRangeSelector rangeSelector = new SfRangeSelector();
rangeSelector.Minimum = 10;
rangeSelector.Maximum = 20;
rangeSelector.RangeStart = 13;
rangeSelector.RangeEnd = 17;
SfCartesianChart chart = new SfCartesianChart();
DateTimeAxis primaryAxis = new DateTimeAxis();
chart.XAxes = primaryAxis;
NumericalAxis secondaryAxis = new NumericalAxis();
chart.YAxes = secondaryAxis;
SplineAreaSeries series = new SplineAreaSeries();
series.ItemsSource = (new ViewModel()).Source;
series.XBindingPath = "X";
series.YBindingPath = "Y";
rangeSelector.Content = chart;
The ShowLabels property enables the labels which renders on given interval.
The ShowTicks property enables the ticks in the Range Selector, while the MinorTicksPerInterval property enables the minor ticks between the major ticks.
Invert the Range Selector using the IsInversed property. The default value of the IsInversed property is False.
Add prefix or suffix to the labels using the NumberFormat property.