バージョン

サンプル カテゴリ データ

目的

このトピックでは、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 CategoryDataPoint
{
    public CategoryDataPoint() { }
    public int Index { get; set; }
    public string Category { get; set; }
    public double Value { get; set; }
    public double High { get; set; }
    public double Low { get; set; }
}

データ ソース

C# の場合:

public class CategoryDataSource : List<CategoryDataPoint>
{
    public CategoryDataSource()
    {
        this.Add(new CategoryDataPoint { Category = "A", Value = 85, Low = 80, High = 95 });
        this.Add(new CategoryDataPoint { Category = "B", Value = 50, Low = 45, High = 65 });
        this.Add(new CategoryDataPoint { Category = "C", Value = 75, Low = 70, High = 90 });
        this.Add(new CategoryDataPoint { Category = "D", Value = 100, Low = 75, High = 95 });
        this.Add(new CategoryDataPoint { Category = "E", Value = 80, Low = 65, High = 80 });
        this.Add(new CategoryDataPoint { Category = "F", Value = 40, Low = 35, High = 55 });
        this.Add(new CategoryDataPoint { Category = "G", Value = 80, Low = 35, High = 50 });
        this.Add(new CategoryDataPoint { Category = "H", Value = 75, Low = 70, High = 90 });
        this.Add(new CategoryDataPoint { Category = "I", Value = 80, Low = 65, High = 80 });
        this.Add(new CategoryDataPoint { Category = "J", Value = 85, Low = 80, High = 90 });
        this.Add(new CategoryDataPoint { Category = "K", Value = 50, Low = 45, High = 60 });
        this.Add(new CategoryDataPoint { Category = "L", Value = 85, Low = 80, High = 90 });
        this.Add(new CategoryDataPoint { Category = "M", Value = 50, Low = 45, High = 60 });
        this.Add(new CategoryDataPoint { Category = "N", Value = 75, Low = 70, High = 90 });
        this.Add(new CategoryDataPoint { Category = "O", Value = 100, Low = 75, High = 95 });
        this.Add(new CategoryDataPoint { Category = "P", Value = 80, Low = 65, High = 80 });
        this.Add(new CategoryDataPoint { Category = "Q", Value = 40, Low = 35, High = 50 });
        this.Add(new CategoryDataPoint { Category = "R", Value = 80, Low = 35, High = 50 });
        this.Add(new CategoryDataPoint { Category = "S", Value = 75, Low = 70, High = 90 });
        this.Add(new CategoryDataPoint { Category = "T", Value = 80, Low = 65, High = 80 });
        this.Add(new CategoryDataPoint { Category = "U", Value = 85, Low = 80, High = 90 });
        this.Add(new CategoryDataPoint { Category = "W", Value = 50, Low = 45, High = 60 });
        this.Add(new CategoryDataPoint { Category = "V", Value = 85, Low = 80, High = 90 });
        this.Add(new CategoryDataPoint { Category = "X", Value = 50, Low = 45, High = 60 });
        this.Add(new CategoryDataPoint { Category = "Y", Value = 75, Low = 70, High = 90 });
        this.Add(new CategoryDataPoint { Category = "Z", Value = 100, Low = 75, High = 95 });
        int i = 0;
        foreach (CategoryDataPoint dataPoint in this)
        {
            dataPoint.Index = i++;
        }
    }
}