Class SplineAreaSeries
SplineAreaSeries connects it data points using a smooth line segment with the areas below are filled in.
Inheritance
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.UWP.dll
Syntax
public class SplineAreaSeries : XyDataSeries, ICloneable, ISupportAxes2D, ISupportAxes, ISegmentSelectable
Examples
<syncfusion:SplineAreaSeries ItemsSource="{Binding Data}" XBindingPath="Year" YBindingPath="Value">
</syncfusion:SplineAreaSeries>
SplineAreaSeries series1 = new SplineAreaSeries();
series1.ItemsSource = viewmodel.Data;
series1.XBindingPath = "Year";
series1.YBindingPath = "Value";
chart.Series.Add(series1);
Constructors
SplineAreaSeries()
Declaration
public SplineAreaSeries()
Fields
IsClosedProperty
The DependencyProperty for IsClosed property.
Declaration
public static readonly DependencyProperty IsClosedProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SegmentSelectionBrushProperty
The DependencyProperty for SegmentSelectionBrush property.
Declaration
public static readonly DependencyProperty SegmentSelectionBrushProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedIndexProperty
The DependencyProperty for SelectedIndex property.
Declaration
public static readonly DependencyProperty SelectedIndexProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SplineTypeProperty
Using a DependencyProperty as the backing store for SplineType. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SplineTypeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
IsAreaTypeSeries
This property used to confirm whether it is area typed series.
Declaration
protected override bool IsAreaTypeSeries { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
Remarks
Returns true
if its linear, otherwise it returns false
.
IsClosed
Gets or sets a value indicating whether area path should be closed or opened.
Declaration
public bool IsClosed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If its |
IsLinear
Gets the value which confirms whether this series in linearity.
Declaration
protected override bool IsLinear { get; }
Property Value
Type |
---|
System.Boolean |
Overrides
Remarks
Returns true
if its linear, otherwise it returns false
.
SegmentSelectionBrush
Gets or sets the interior(brush) for the selected segment(s).
Declaration
public Brush SegmentSelectionBrush { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Brush | The Windows.UI.Xaml.Media.Brush value. |
SelectedIndex
Gets or sets the index of the selected segment.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
|
SelectedSegments
Gets the selected segments in this series, when we enable the multiple selection.
Declaration
protected override List<ChartSegment> SelectedSegments { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ChartSegment> | It returns the list of ChartSegment. |
Overrides
SplineType
Gets or sets SplineType enum value which indicates the spline series type.
Declaration
public SplineType SplineType { get; set; }
Property Value
Type | Description |
---|---|
SplineType |
Methods
CloneSeries(DependencyObject)
Returns the instance of SplineAreaSeries series.
Declaration
protected override DependencyObject CloneSeries(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | obj | object |
Returns
Type |
---|
Windows.UI.Xaml.DependencyObject |
Overrides
CreateSegment()
Creates an instance of series segment.
Declaration
protected override ChartSegment CreateSegment()
Returns
Type | Description |
---|---|
ChartSegment | Returns the instance of corresponding series segment. |
Overrides
Remarks
This customization is not supported for fast type series and technical indicators.
Examples
This sample shows how to call the CreateSegment() method to customize the line series segments.
public class LineSeriesExt : LineSeries
{
protected override ChartSegment CreateSegment()
{
return new LineSegmentExt();
}
}
public class LineSegmentExt : LineSegment
{
public override UIElement CreateVisual(Size size)
{
// Write your customization code here.
}
public override void Update(IChartTransformer transformer)
{
// Write your customization code here.
}
}
CreateSegments()
Creates the segments of SplineAreaSeries.
Declaration
public override void CreateSegments()
Overrides
GetBezierControlPoints(ChartPoint, ChartPoint, Double, Double, out ChartPoint, out ChartPoint)
Method used to calculate the bezier values.
Declaration
protected void GetBezierControlPoints(ChartPoint point1, ChartPoint point2, double ys1, double ys2, out ChartPoint controlPoint1, out ChartPoint controlPoint2)
Parameters
Type | Name | Description |
---|---|---|
ChartPoint | point1 | chart point |
ChartPoint | point2 | chart point |
System.Double | ys1 | ys1 |
System.Double | ys2 | ys2 |
ChartPoint | controlPoint1 | chart point |
ChartPoint | controlPoint2 | chart point |
GetCardinalSpline(List<Double>, IList<Double>)
Method used to calculate cardinal spline values.
Declaration
protected void GetCardinalSpline(List<double> xValues, IList<double> yValues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Double> | xValues | xvalues |
System.Collections.Generic.IList<System.Double> | yValues | yvalues |
GetMonotonicSpline(List<Double>, IList<Double>)
Method used to calculate monotonic spline values.
Declaration
protected void GetMonotonicSpline(List<double> xValues, IList<double> yValues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Double> | xValues | xvalues |
System.Collections.Generic.IList<System.Double> | yValues | yvalues |
NaturalSpline(List<Double>, IList<Double>, out Double[])
Method used to calculate the natural spline values.
Declaration
protected void NaturalSpline(List<double> xValues, IList<double> yValues, out double[] ys2)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Double> | xValues | xvalues |
System.Collections.Generic.IList<System.Double> | yValues | yvalues |
System.Double[] | ys2 | ys2 |
OnDataSourceChanged(IEnumerable, IEnumerable)
Called when ItemsSource property changed.
Declaration
protected override void OnDataSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | oldValue | old value |
System.Collections.IEnumerable | newValue | new value |
Overrides
OnTapped(TappedRoutedEventArgs)
Used to update the series tooltip when tapping on the series segments.
Declaration
protected override void OnTapped(TappedRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.TappedRoutedEventArgs | e | TappedRoutedEventArgs |
Overrides
SelectedIndexChanged(Int32, Int32)
Method used to set SegmentSelectionBrush to SelectedIndex segment.
Declaration
protected override void SelectedIndexChanged(int newIndex, int oldIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | newIndex | new index |
System.Int32 | oldIndex | old index |