Telerik UI for Windows 8 XAML


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

Categorical Line Series

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


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

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

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

    C# Copy imageCopy
    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.lineSeries.DataContext = data;
  3. Finally, create the chart using XAML.

    XAML Copy imageCopy
    <telerik:RadCartesianChart x:Name="lineSeries">
        <telerik:LineSeries ItemsSource="{Binding}">
                <telerik:PropertyNameDataPointBinding PropertyName="Category"/>
                <telerik:PropertyNameDataPointBinding PropertyName="Value"/>