バージョン

輪郭データの例

ContourDataSample オブジェクトは、xamDataChart コントロールの ContourAreaSeries というカスタム シリーズのサンプル データを提供します。

Visual Basic の場合:

Imports System.Collections.Generic
Namespace Infragistics.Samples.Common
    ''' <summary>
    ''' 同じ値を持つ ContourDataPoint オブジェクトの輪郭データ モデルを表します。
    ''' </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>
    ''' ContourDataPoint オブジェクトの輪郭データ モデルを表します
    ''' </summary>
    Public Class ContourData
        Inherits List(Of ContourDataPoint)
    End Class
    ''' <summary>
    ''' 輪郭の一点を表す散布データ ポイントを表します
    ''' </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

C# の場合:

using System.Collections.Generic;
namespace Infragistics.Samples.Common
{
    /// <summary>
    /// 同じ値を持つ ContourDataPoint オブジェクトの輪郭データ モデルを表します
    /// </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>
    /// ContourDataPoint オブジェクトの輪郭データ モデルを表します
    /// </summary>
    public class ContourData : List<ContourDataPoint>
    { }
    /// <summary>
    /// 輪郭の一点を表す散布データ ポイントを表します
    /// </summary>
    public class ContourDataPoint
    {
        public double X { get; set; }
        public double Y { get; set; }
        public double Value { get; set; }
    }
}