Telerik UI for Windows 8 XAML

Overview

The ScatterPointSeries are represented on the chart as not connected data points presented by an arbitrary Template. Each scatter data point has X and Y values which make the position of the data point in the data source and its location on the plot area unrelated. For example the third data point in the data source may appear before the first data point when plotted. There are also scatter line and scatter area series which behave in the exact same way with the only (visual) difference that the points define a line and area respectively.

Scatter Point Series

Properties

Note

ScatterPointSeries class inherits from the CartesianSeries class - See the inherited properties.

  • DataPoints: Gets the collection of data points associated with the series.

  • XValueBinding: Gets or sets the binding that will be used to fill the XValue of ScatterDataPoint members of the DataPoints collection.

  • YValueBinding: Gets or sets the binding that will be used to fill the YValue of ScatterDataPoint members of the DataPoints collection.

Example

Here's an example of how to implement a RadCartesianChart with the ScatterPoint Series.

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

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

    C# Copy imageCopy
    List<Data> sampleData = new List<Data>();
    sampleData.Add(new Data() { Category = 2, Value = 3 });
    sampleData.Add(new Data() { Category = 3, Value = 4 });
    sampleData.Add(new Data() { Category = 4, Value = 5 });
    sampleData.Add(new Data() { Category = 5, Value = 6 });
    sampleData.Add(new Data() { Category = 6, Value = 5 });
    sampleData.Add(new Data() { Category = 7, Value = 4 });
    sampleData.Add(new Data() { Category = 8, Value = 3 });
    sampleData.Add(new Data() { Category = 9, Value = 4 });
    sampleData.Add(new Data() { Category = 10, Value = 5 });
    sampleData.Add(new Data() { Category = 11, Value = 4 });
    sampleData.Add(new Data() { Category = 12, Value = 3 });
    sampleData.Add(new Data() { Category = 13, Value = 2 });
    sampleData.Add(new Data() { Category = 14, Value = 1 });
    
    this.scatterPointSeries.DataContext = sampleData;
  3. Finally, create a chart using XAML.

    XAML Copy imageCopy
    <telerik:RadCartesianChart x:Name="scatterPointSeries">
        <telerik:RadCartesianChart.VerticalAxis>
            <telerik:LinearAxis/>
        </telerik:RadCartesianChart.VerticalAxis>
        <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:LinearAxis/>
        </telerik:RadCartesianChart.HorizontalAxis>
        <telerik:ScatterPointSeries ItemsSource="{Binding}">
            <telerik:ScatterPointSeries.XValueBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="Category"/>
            </telerik:ScatterPointSeries.XValueBinding>
            <telerik:ScatterPointSeries.YValueBinding>
                <telerik:PropertyNameDataPointBinding PropertyName="Value"/>
            </telerik:ScatterPointSeries.YValueBinding>
        </telerik:ScatterPointSeries>
    </telerik:RadCartesianChart>