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
}
This topic provides sample data and data models for use with the XamDataChart™ control and its Category Series or Radial Series types.
This topic contains the following sections:
In 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
}
In 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; }
}
In 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++;
}
}
}