バージョン

サンプル極座標データ

目的

このトピックでは、XamDataChart コントロールおよびその極座標シリーズ タイプで使用するデータおよびデータ モデルを提供します。

このトピックの内容

このトピックは、以下のセクションで構成されます。

必須の名前空間

C# の場合:

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
namespace Infragistics.Models
{
  // TODO add data model
  // TODO add data source
}

データ モデル

C# の場合:

public class PolarDataPoint
{
    public double Angle { get; set; }
    public double Radius { get; set; }
}

データ ソース

C# の場合:

public class PolarDataSource : List<PolarDataPoint>
{
    public PolarDataSource()
    {
        this.Add(new PolarDataPoint { Angle = 0, Radius = 80 });
        this.Add(new PolarDataPoint { Angle = 30, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 45, Radius = 40 });
        this.Add(new PolarDataPoint { Angle = 60, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 90, Radius = 80 });
        this.Add(new PolarDataPoint { Angle = 120, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 135, Radius = 40 });
        this.Add(new PolarDataPoint { Angle = 150, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 180, Radius = 20 });
        this.Add(new PolarDataPoint { Angle = 210, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 225, Radius = 40 });
        this.Add(new PolarDataPoint { Angle = 240, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 270, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 300, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 315, Radius = 40 });
        this.Add(new PolarDataPoint { Angle = 330, Radius = 60 });
        this.Add(new PolarDataPoint { Angle = 360, Radius = 80 });
    }
}