menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SplineAreaSeries - API Reference

    Show / Hide Table of Contents

    Class SplineAreaSeries

    The SplineAreaSeries is a collection of data points using smooth Bezier line curves with the areas below filled.

    Inheritance
    System.Object
    ChartSeries
    CartesianSeries
    XYDataSeries
    AreaSeries
    SplineAreaSeries
    Inherited Members
    AreaSeries.StrokeProperty
    AreaSeries.StrokeDashArrayProperty
    AreaSeries.ShowMarkersProperty
    AreaSeries.MarkerSettingsProperty
    AreaSeries.DrawMarker(ICanvas, Int32, ShapeType, Rect)
    AreaSeries.StrokeDashArray
    AreaSeries.Stroke
    AreaSeries.ShowMarkers
    AreaSeries.MarkerSettings
    XYDataSeries.YBindingPathProperty
    XYDataSeries.StrokeWidthProperty
    XYDataSeries.YBindingPath
    XYDataSeries.StrokeWidth
    CartesianSeries.XAxisNameProperty
    CartesianSeries.YAxisNameProperty
    CartesianSeries.DataLabelSettingsProperty
    CartesianSeries.LabelProperty
    CartesianSeries.ShowTrackballLabelProperty
    CartesianSeries.OnBindingContextChanged()
    CartesianSeries.XAxisName
    CartesianSeries.YAxisName
    CartesianSeries.DataLabelSettings
    CartesianSeries.Label
    CartesianSeries.ActualXAxis
    CartesianSeries.ActualYAxis
    CartesianSeries.ShowTrackballLabel
    ChartSeries.ItemsSourceProperty
    ChartSeries.XBindingPathProperty
    ChartSeries.FillProperty
    ChartSeries.PaletteBrushesProperty
    ChartSeries.IsVisibleProperty
    ChartSeries.OpacityProperty
    ChartSeries.EnableAnimationProperty
    ChartSeries.EnableTooltipProperty
    ChartSeries.TooltipTemplateProperty
    ChartSeries.ShowDataLabelsProperty
    ChartSeries.LegendIconProperty
    ChartSeries.IsVisibleOnLegendProperty
    ChartSeries.SelectionBehaviorProperty
    ChartSeries.CreateAnimation(Action<Double>)
    ChartSeries.DrawDataLabel(ICanvas, Brush, String, PointF, Int32)
    ChartSeries.DrawSeries(ICanvas, ReadOnlyObservableCollection<ChartSegment>, RectF)
    ChartSeries.ItemsSource
    ChartSeries.XBindingPath
    ChartSeries.Fill
    ChartSeries.PaletteBrushes
    ChartSeries.IsVisible
    ChartSeries.Opacity
    ChartSeries.EnableAnimation
    ChartSeries.EnableTooltip
    ChartSeries.TooltipTemplate
    ChartSeries.ShowDataLabels
    ChartSeries.LegendIcon
    ChartSeries.IsVisibleOnLegend
    ChartSeries.SelectionBehavior
    ChartSeries.XRange
    ChartSeries.YRange
    Namespace: Syncfusion.Maui.Charts
    Assembly: Syncfusion.Maui.Charts.dll
    Syntax
    public class SplineAreaSeries : AreaSeries, IDatapointSelectionDependent, ITooltipDependent, IDrawCustomLegendIcon, IMarkerDependent
    Remarks

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

    It provides options for Fill, PaletteBrushes, StrokeWidth, and Opacity to customize the appearance.

    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 SplineAreaSeries 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 SplineAreaSeries 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 using 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:SplineAreaSeries
                      ItemsSource="{Binding Data}"
                      XBindingPath="XValue"
                      YBindingPath="YValue"/>
              </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();
    
        SplineAreaSeries series = new SplineAreaSeries();
        series.ItemsSource = viewModel.Data;
        series.XBindingPath = "XValue";
        series.YBindingPath = "YValue";
        chart.Series.Add(series);
        public ObservableCollection<Model> Data { get; set; }
    
        public ViewModel()
        {
           Data = new ObservableCollection<Model>();
           Data.Add(new Model() { XValue = 10, YValue = 100 });
           Data.Add(new Model() { XValue = 20, YValue = 150 });
           Data.Add(new Model() { XValue = 30, YValue = 110 });
           Data.Add(new Model() { XValue = 40, YValue = 230 });
        }

    Constructors

    SplineAreaSeries()

    Declaration
    public SplineAreaSeries()

    Fields

    TypeProperty

    Identifies the Type bindable property.

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

    Properties

    Type

    Gets or sets a value that indicates the shape of the spline 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:SplineAreaSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               YBindingPath="YValue"
                               Type = "Monotonic"/>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        SplineAreaSeries series = new SplineAreaSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              Type = SplineType.Monotonic,
        };
    
        chart.Series.Add(series);

    Methods

    CreateSegment()

    Declaration
    protected override ChartSegment CreateSegment()
    Returns
    Type Description
    ChartSegment
    Overrides
    AreaSeries.CreateSegment()

    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 Description
    System.Int32
    Overrides
    AreaSeries.GetDataPointIndex(Single, Single)

    See Also

    SplineAreaSegment
    SplineSeries
    AreaSeries
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved