menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SplineSeries - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SplineSeries

    The SplineSeries is a set of data points linked together by smooth beizer curves.

    Inheritance
    System.Object
    ChartSeries
    CartesianSeries
    XyDataSeries
    SplineSeries
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    CartesianSeries.DataLabelSettings
    CartesianSeries.DataLabelSettingsProperty
    CartesianSeries.OnApplyTemplate()
    CartesianSeries.ShowTrackballLabel
    CartesianSeries.ShowTrackballLabelProperty
    CartesianSeries.XAxisName
    CartesianSeries.XAxisNameProperty
    CartesianSeries.YAxisName
    CartesianSeries.YAxisNameProperty
    ChartSeries.ActualXAxis
    ChartSeries.ActualYAxis
    ChartSeries.AnimationDuration
    ChartSeries.AnimationDurationProperty
    ChartSeries.Chart
    ChartSeries.EnableAnimation
    ChartSeries.EnableAnimationProperty
    ChartSeries.EnableTooltip
    ChartSeries.EnableTooltipProperty
    ChartSeries.Fill
    ChartSeries.FillProperty
    ChartSeries.IsSeriesVisible
    ChartSeries.IsSeriesVisibleProperty
    ChartSeries.IsVisibleOnLegend
    ChartSeries.IsVisibleOnLegendProperty
    ChartSeries.ItemsSource
    ChartSeries.ItemsSourceProperty
    ChartSeries.Label
    ChartSeries.LabelProperty
    ChartSeries.LegendIcon
    ChartSeries.LegendIconProperty
    ChartSeries.LegendIconTemplate
    ChartSeries.LegendIconTemplateProperty
    ChartSeries.ListenPropertyChange
    ChartSeries.ListenPropertyChangeProperty
    ChartSeries.OnPointerExited(PointerRoutedEventArgs)
    ChartSeries.OnPointerMoved(PointerRoutedEventArgs)
    ChartSeries.OnPointerPressed(PointerRoutedEventArgs)
    ChartSeries.OnPointerReleased(PointerRoutedEventArgs)
    ChartSeries.PaletteBrushes
    ChartSeries.PaletteBrushesProperty
    ChartSeries.PropertyChanged
    ChartSeries.ResumeNotification()
    ChartSeries.SelectionBehavior
    ChartSeries.SelectionBehaviorProperty
    ChartSeries.ShowDataLabels
    ChartSeries.ShowDataLabelsProperty
    ChartSeries.SpacingProperty
    ChartSeries.SuspendNotification()
    ChartSeries.TooltipTemplate
    ChartSeries.TooltipTemplateProperty
    ChartSeries.TrackballLabelTemplate
    ChartSeries.TrackballLabelTemplateProperty
    ChartSeries.XBindingPath
    ChartSeries.XBindingPathProperty
    XyDataSeries.StrokeWidth
    XyDataSeries.StrokeWidthProperty
    XyDataSeries.YBindingPath
    XyDataSeries.YBindingPathProperty
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.Chart.WinUI.dll
    Syntax
    public class SplineSeries : XyDataSeries, INotifyPropertyChanged
    Remarks

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

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

    EnableTooltip - A tooltip displays information while tapping or mouse hovering over a segment. To display the tooltip on chart, need to set the EnableTooltip property as true in SplineSeries 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 property as true in SplineSeries 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:SplineSeries ItemsSource="{Binding Data}"
                                XBindingPath="XValue"
                                YBindingPath="YValue"/>
    
        </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();
    
        SplineSeries series = new SplineSeries();
        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

    SplineSeries()

    Declaration
    public SplineSeries()

    Fields

    CustomTemplateProperty

    The DependencyProperty for CustomTemplate property.

    Declaration
    public static readonly DependencyProperty CustomTemplateProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    StrokeDashArrayProperty

    The Dependency property for StrokeDashArray

    Declaration
    public static readonly DependencyProperty StrokeDashArrayProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    TypeProperty

    Using a DependencyProperty as the backing store for SplineType. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty TypeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    Properties

    CustomTemplate

    Gets or sets the template to customize the appearance of spline series.

    Declaration
    public DataTemplate CustomTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.DataTemplate

    It accepts Microsoft.UI.Xaml.DataTemplate value.

    StrokeDashArray

    Gets or sets the stroke dash array to customize the appearance of spline curve.

    Declaration
    public DoubleCollection StrokeDashArray { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Media.DoubleCollection

    It accepts the Microsoft.UI.Xaml.Media.DoubleCollection value and the default value is null.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:SplineSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               YBindingPath="YValue"
                               StrokeDashArray="5,3" />
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        DoubleCollection doubleCollection = new DoubleCollection();
        doubleCollection.Add(5);
        doubleCollection.Add(3);
        SplineSeries series = new SplineSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              StrokeDashArray = doubleCollection,
        };
    
        chart.Series.Add(series);

    Type

    Gets or sets a value that indicate the spline type.

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

    It accepts SplineType values and the default value is Natural.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:SplineSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               YBindingPath="YValue"
                               Type="Cardinal" />
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        SplineSeries series = new SplineSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              Type = SplineType.Cardinal,
        };
    
        chart.Series.Add(series);

    Methods

    OnTapped(TappedRoutedEventArgs)

    Declaration
    protected override void OnTapped(TappedRoutedEventArgs e)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.TappedRoutedEventArgs e
    Overrides
    ChartSeries.OnTapped(TappedRoutedEventArgs)

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

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