Available for: Windows 8.1 | Windows Phone 8.1

Spline Series

Overview

The SplineSeries are represented on the chart as data points connected with smooth line segments as shown on the image below.

Categorical Spline Series

SplineSeries class inherits from the LineSeries class - See the inherited properties.

Example

Here's an example of how to create a RadCartesianChart with SplineSeries.

  1. First, create a class for the sample data.

    public class Data
    {
        public string Category { get; set; }
    
        public double Value { get; set; }
    }
    
  2. Then create the sample data.

    List<Data> data = new List<Data>();
    data.Add(new Data() { Category = "Apples", Value = 5 });
    data.Add(new Data() { Category = "Oranges", Value = 9 });
    data.Add(new Data() { Category = "Pineaples", Value = 8 });
    

    this.splineSeries.DataContext = data;

  3. Finally, create the chart using XAML.

    <telerikChart:RadCartesianChart x:Name="splineSeries" PaletteName="DefaultLight">
        <telerikChart:RadCartesianChart.VerticalAxis>
            <telerikChart:LinearAxis/>
        </telerikChart:RadCartesianChart.VerticalAxis>
        <telerikChart:RadCartesianChart.HorizontalAxis>
            <telerikChart:CategoricalAxis/>
        </telerikChart:RadCartesianChart.HorizontalAxis>
    
        <telerikChart:SplineSeries ItemsSource="{Binding}">
            <telerikChart:SplineSeries.CategoryBinding>
                <telerikChart:PropertyNameDataPointBinding PropertyName="Category"/>
            </telerikChart:SplineSeries.CategoryBinding>
            <telerikChart:SplineSeries.ValueBinding>
                <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
            </telerikChart:SplineSeries.ValueBinding>
        </telerikChart:SplineSeries>
    </telerikChart:RadCartesianChart>