menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SplineRangeAreaSeries - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SplineRangeAreaSeries

    The SplineRangeAreaSeries is a set of data points represented by smooth Bezier curves, with the area between the curves filled to illustrate the range between two values.

    Inheritance
    System.Object
    ChartSeries
    CartesianSeries
    RangeSeriesBase
    SplineRangeAreaSeries
    Inherited Members
    CartesianSeries.ActualXAxis
    CartesianSeries.ActualYAxis
    CartesianSeries.DataLabelSettings
    CartesianSeries.DataLabelSettingsProperty
    CartesianSeries.GetDataPoints(Double, Double, Double, Double)
    CartesianSeries.GetDataPoints(Rect)
    CartesianSeries.Label
    CartesianSeries.LabelProperty
    CartesianSeries.ShowTrackballLabel
    CartesianSeries.ShowTrackballLabelProperty
    CartesianSeries.TrackballLabelTemplate
    CartesianSeries.TrackballLabelTemplateProperty
    CartesianSeries.XAxisName
    CartesianSeries.XAxisNameProperty
    CartesianSeries.YAxisName
    CartesianSeries.YAxisNameProperty
    ChartSeries.CreateAnimation(Action<Double>)
    ChartSeries.DrawDataLabel(ICanvas, Brush, String, PointF, Int32)
    ChartSeries.DrawSeries(ICanvas, ReadOnlyObservableCollection<ChartSegment>, RectF)
    ChartSeries.EnableAnimation
    ChartSeries.EnableAnimationProperty
    ChartSeries.EnableTooltip
    ChartSeries.EnableTooltipProperty
    ChartSeries.Fill
    ChartSeries.FillProperty
    ChartSeries.IsVisible
    ChartSeries.IsVisibleOnLegend
    ChartSeries.IsVisibleOnLegendProperty
    ChartSeries.IsVisibleProperty
    ChartSeries.ItemsSource
    ChartSeries.ItemsSourceProperty
    ChartSeries.LabelContext
    ChartSeries.LabelContextProperty
    ChartSeries.LabelTemplate
    ChartSeries.LabelTemplateProperty
    ChartSeries.LegendIcon
    ChartSeries.LegendIconProperty
    ChartSeries.OnParentSet()
    ChartSeries.Opacity
    ChartSeries.OpacityProperty
    ChartSeries.PaletteBrushes
    ChartSeries.PaletteBrushesProperty
    ChartSeries.SelectionBehavior
    ChartSeries.SelectionBehaviorProperty
    ChartSeries.ShowDataLabels
    ChartSeries.ShowDataLabelsProperty
    ChartSeries.TooltipTemplate
    ChartSeries.TooltipTemplateProperty
    ChartSeries.XBindingPath
    ChartSeries.XBindingPathProperty
    ChartSeries.XRange
    ChartSeries.YRange
    RangeSeriesBase.High
    RangeSeriesBase.HighProperty
    RangeSeriesBase.Low
    RangeSeriesBase.LowProperty
    RangeSeriesBase.Stroke
    RangeSeriesBase.StrokeDashArray
    RangeSeriesBase.StrokeDashArrayProperty
    RangeSeriesBase.StrokeProperty
    RangeSeriesBase.StrokeWidth
    RangeSeriesBase.StrokeWidthProperty
    Namespace: Syncfusion.Maui.Charts
    Assembly: Syncfusion.Maui.Charts.dll
    Syntax
    public class SplineRangeAreaSeries : RangeSeriesBase, IDatapointSelectionDependent, ITooltipDependent, IDataTemplateDependent, IMarkerDependent, IDrawCustomLegendIcon
    Remarks

    To render a series, create an instance of SplineRangeAreaSeries class, and add it to the Series collection.

    EnableTooltip - A tooltip displays information while tapping or mouse hovering above a segment. To display the tooltip on a chart, you need to set the EnableTooltip property as True in SplineRangeAreaSeries class, and also refer TooltipBehavior property.

    Data Label - Data labels are used to display values related to a chart segment. To render the data labels, you need to set the ShowDataLabels property as True in SplineRangeAreaSeries class. To customize the chart data labels alignment, placement, and label styles, you need to create an instance of CartesianDataLabelSettings and set to the DataLabelSettings property.

    Animation - To animate the series, set True to the EnableAnimation property.

    LegendIcon - To customize the legend icon use the LegendIcon property.

    Examples
    • Xaml
    • C#
    • ViewModel
        <chart:SfCartesianChart>
    
              <chart:SfCartesianChart.XAxes>
                  <chart:NumericalAxis/>
              </chart:SfCartesianChart.XAxes>
    
              <chart:SfCartesianChart.YAxes>
                  <chart:NumericalAxis/>
              </chart:SfCartesianChart.YAxes>
    
              <chart:SfCartesianChart.Series>
                  <chart:SplineRangeAreaSeries
                      ItemsSource="{Binding Data}"
                      XBindingPath="XValue"
                      High="HighValue"
                      Low="LowValue"/>
              </chart:SfCartesianChart.Series>  
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
    
        NumericalAxis xAxis = new NumericalAxis();
        NumericalAxis yAxis = new NumericalAxis();
    
        chart.XAxes.Add(xAxis);
        chart.YAxes.Add(yAxis);
    
        ViewModel viewModel = new ViewModel();
    
        SplineRangeAreaSeries series = new SplineRangeAreaSeries();
        series.ItemsSource = viewModel.Data;
        series.XBindingPath = "XValue";
        series.High = "HighValue";
        series.Low = "LowValue";
        chart.Series.Add(series);
    public ObservableCollection<Model> Data { get; set; }
    public ViewModel()
    {
       Data = new ObservableCollection<Model>();
       Data.Add(new Model() { XValue =  1, High = 2, Low = 4 });
       Data.Add(new Model() { XValue =  2, High = 4, Low = 6 });
       Data.Add(new Model() { XValue =  3, High = 3, Low = 5 });
       Data.Add(new Model() { XValue =  4, High = 6, Low = 8 });
       Data.Add(new Model() { XValue =  5, High = 7, Low = 9 });
    }

    Constructors

    SplineRangeAreaSeries()

    Declaration
    public SplineRangeAreaSeries()

    Fields

    MarkerSettingsProperty

    Identifies the MarkerSettings bindable property.

    Declaration
    public static readonly BindableProperty MarkerSettingsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowMarkersProperty

    Identifies the ShowMarkers bindable property.

    Declaration
    public static readonly BindableProperty ShowMarkersProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TypeProperty

    Identifies the Type bindable property.

    Declaration
    public static readonly BindableProperty TypeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    Properties

    MarkerSettings

    Gets or sets the option for customize the series markers.

    Declaration
    public ChartMarkerSettings MarkerSettings { get; set; }
    Property Value
    Type Description
    ChartMarkerSettings

    It accepts ChartMarkerSettings.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:SplineRangeAreaSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               High="HighValue"
                               Low="LowValue"
                               ShowMarkers="True">
                  <chart:SplineRangeAreaSeries.MarkerSettings>
                        <chart:ChartMarkerSettings Fill="Red" Height="15" Width="15" />
                  </chart:SplineRangeAreaSeries.MarkerSettings>
             </chart:SplineRangeAreaSeries>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
       ChartMarkerSettings chartMarkerSettings = new ChartMarkerSettings()
       {
           Fill = new SolidColorBrush(Colors.Red),
           Height = 15,
           Width = 15,
       };
        SplineRangeAreaSeries series = new SplineRangeAreaSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              High = "HighValue",
              Low = "LowValue",
              ShowMarkers= true,
              MarkerSettings= chartMarkerSettings,
        };
    
        chart.Series.Add(series);

    ShowMarkers

    Gets or sets the value indicating whether to show markers for the series data point.

    Declaration
    public bool ShowMarkers { get; set; }
    Property Value
    Type Description
    System.Boolean

    It accepts boolean values and its default value is false.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:SplineRangeAreaSeries ItemsSource="{Binding Data}"
                                          XBindingPath="XValue"
                                          High="HighValue"
                                          Low="LowValue"
                                          ShowMarkers="True"/>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        SplineRangeAreaSeries series = new SplineRangeAreaSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              HighValue = "HighValue",
              LowValue = "LowValue",
              ShowMarkers= true,
        };
    
        chart.Series.Add(series);

    Type

    Gets or sets a value that indicates the shape of the spline range area series.

    Declaration
    public SplineType Type { get; set; }
    Property Value
    Type Description
    SplineType

    It accepts SplineType values and its default value is Natural.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:SplineRangeAreaSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               High="HighValue"
                               Low="LowValue"
                               Type = "Monotonic"/>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        SplineRangeAreaSeries series = new SplineRangeAreaSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              High="HighValue",
              Low="LowValue",
              Type = SplineType.Monotonic,
        };
    
        chart.Series.Add(series);

    Methods

    CreateSegment()

    Create Spline range area segment

    Declaration
    protected override ChartSegment CreateSegment()
    Returns
    Type
    ChartSegment
    Overrides
    ChartSeries.CreateSegment()

    DrawMarker(ICanvas, Int32, ShapeType, Rect)

    Draw the marker shape

    Declaration
    protected virtual void DrawMarker(ICanvas canvas, int index, ShapeType type, Rect rect)
    Parameters
    Type Name Description
    Microsoft.Maui.Graphics.ICanvas canvas
    System.Int32 index
    ShapeType type
    Microsoft.Maui.Graphics.Rect rect

    GetDataPointIndex(Single, Single)

    Methods to get the index of data point.

    Declaration
    public override int GetDataPointIndex(float pointX, float pointY)
    Parameters
    Type Name Description
    System.Single pointX
    System.Single pointY
    Returns
    Type
    System.Int32
    Overrides
    ChartSeries.GetDataPointIndex(Single, Single)

    OnBindingContextChanged()

    Declaration
    protected override void OnBindingContextChanged()
    Overrides
    CartesianSeries.OnBindingContextChanged()

    See Also

    SplineRangeAreaSegment
    SplineSeries
    SplineAreaSeries
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved