Class SplineSeries
The SplineSeries is a set of data points linked together by smooth beizer curves.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public class SplineSeries : XySeriesDraggingBase, ISupportAxes, ISegmentSelectable
Remarks
To render a series, create an instance of SplineSeries class, and add it to the Series collection.
It provides options for Fill, PaletteBrushes, StrokeThickness, 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 ShowDataLabels 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
<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>
Constructors
SplineSeries()
Declaration
public SplineSeries()
Fields
CustomTemplateProperty
The DependencyProperty for CustomTemplate property.
Declaration
public static readonly DependencyProperty CustomTemplateProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
SelectionBehaviorProperty
The DependencyProperty for SelectionBehavior property. .
Declaration
public static readonly DependencyProperty SelectionBehaviorProperty
Field Value
Type | Description |
---|---|
Microsoft.UI.Xaml.DependencyProperty |
StrokeDashArrayProperty
The Dependency property for StrokeDashArray
Declaration
public static readonly DependencyProperty StrokeDashArrayProperty
Field Value
Type | Description |
---|---|
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 | Description |
---|---|
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. |
SelectionBehavior
Gets or sets a selection behavior that enables you to select or highlight a segment in the series.
Declaration
public DataPointSelectionBehavior SelectionBehavior { get; set; }
Property Value
Type | Description |
---|---|
DataPointSelectionBehavior | This property takes the DataPointSelectionBehavior instance as a value, and its default value is null. |
Remarks
To highlight the selected data point, set the value for SelectionBrush property in DataPointSelectionBehavior class.
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SplineSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue">
<chart:SplineSeries.SelectionBehavior>
<chart:DataPointSelectionBehavior SelectionBrush = "Red" />
</chart:SplineSeries.SelectionBehavior>
</chart:SplineSeries>
</chart:SfCartesianChart>
See Also
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
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SplineSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
StrokeDashArray="5,3" />
</chart:SfCartesianChart>
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
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SplineSeries ItemsSource="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
Type="Cardinal" />
</chart:SfCartesianChart>
Methods
OnTapped(TappedRoutedEventArgs)
Declaration
protected override void OnTapped(TappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.TappedRoutedEventArgs | e |