Version

Contour Data Sample

The ContourDataSample object provides sample data for the xamDataChart control’s custom series called: ContourAreaSeries.

In Visual Basic:

Imports System.Collections.Generic
Namespace Infragistics.Samples.Common
    ''' <summary>
    ''' Represents a contour data model of ContourDataPoint objects with samples values
    ''' </summary>
    Public Class ContourDataSample
        Inherits ContourData
        Public Sub New()
            Me.Add(New ContourDataPoint() With { _
                .X = 30, _
                .Y = 60, _
                .Value = 40 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 40, _
                .Y = 50, _
                .Value = 40 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 60, _
                .Y = 60, _
                .Value = 40 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 40, _
                .Y = 70, _
                .Value = 40 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 30, _
                .Y = 60, _
                .Value = 40 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 20, _
                .Y = 60, _
                .Value = 30 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 40, _
                .Y = 30, _
                .Value = 30 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 80, _
                .Y = 60, _
                .Value = 30 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 40, _
                .Y = 90, _
                .Value = 30 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 20, _
                .Y = 60, _
                .Value = 30 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 10, _
                .Y = 60, _
                .Value = 20 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 40, _
                .Y = 10, _
                .Value = 20 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 80, _
                .Y = 30, _
                .Value = 20 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 120, _
                .Y = 60, _
                .Value = 20 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 80, _
                .Y = 90, _
                .Value = 20 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 40, _
                .Y = 110, _
                .Value = 20 _
            })
            Me.Add(New ContourDataPoint() With { _
                .X = 10, _
                .Y = 60, _
                .Value = 20 _
            })
        End Sub
    End Class
    ''' <summary>
    ''' Represents a contour data model of ContourDataPoint objects
    ''' </summary>
    Public Class ContourData
        Inherits List(Of ContourDataPoint)
    End Class
    ''' <summary>
    ''' Represents a scatter data point for representing single point of a contour
    ''' </summary>
    Public Class ContourDataPoint
        Public Property X() As Double
            Get
                Return _X
            End Get
            Set
                _X = Value
            End Set
        End Property
        Private _X As Double
        Public Property Y() As Double
            Get
                Return _Y
            End Get
            Set
                _Y = Value
            End Set
        End Property
        Private _Y As Double
        Public Property Value() As Double
            Get
                Return _Value
            End Get
            Set
                _Value = Value
            End Set
        End Property
        Private _Value As Double
    End Class
End Namespace

In C#:

using System.Collections.Generic;
namespace Infragistics.Samples.Common
{
    /// <summary>
    /// Represents a contour data model of ContourDataPoint objects with samples values
    /// </summary>
    public class ContourDataSample : ContourData
    {
        public ContourDataSample()
        {
            this.Add(new ContourDataPoint { X = 30, Y = 60, Value = 40 });
            this.Add(new ContourDataPoint { X = 40, Y = 50, Value = 40 });
            this.Add(new ContourDataPoint { X = 60, Y = 60, Value = 40 });
            this.Add(new ContourDataPoint { X = 40, Y = 70, Value = 40 });
            this.Add(new ContourDataPoint { X = 30, Y = 60, Value = 40 });
            this.Add(new ContourDataPoint { X = 20, Y = 60, Value = 30 });
            this.Add(new ContourDataPoint { X = 40, Y = 30, Value = 30 });
            this.Add(new ContourDataPoint { X = 80, Y = 60, Value = 30 });
            this.Add(new ContourDataPoint { X = 40, Y = 90, Value = 30 });
            this.Add(new ContourDataPoint { X = 20, Y = 60, Value = 30 });
            this.Add(new ContourDataPoint { X = 10, Y = 60, Value = 20 });
            this.Add(new ContourDataPoint { X = 40, Y = 10, Value = 20 });
            this.Add(new ContourDataPoint { X = 80, Y = 30, Value = 20 });
            this.Add(new ContourDataPoint { X = 120, Y = 60, Value = 20 });
            this.Add(new ContourDataPoint { X = 80, Y = 90, Value = 20 });
            this.Add(new ContourDataPoint { X = 40, Y = 110, Value = 20 });
            this.Add(new ContourDataPoint { X = 10, Y = 60, Value = 20 });
        }
    }
    /// <summary>
    /// Represents a contour data model of ContourDataPoint objects
    /// </summary>
    public class ContourData : List<ContourDataPoint>
    { }
    /// <summary>
    /// Represents a scatter data point for representing single point of a contour
    /// </summary>
    public class ContourDataPoint
    {
        public double X { get; set; }
        public double Y { get; set; }
        public double Value { get; set; }
    }
}