<ig:XamShapeChart x:Name="ShapeChart"
ChartType="Spline" >
</ig:XamShapeChart>
チャート タイプ トピックに説明がありますが、チャートはプロパティを変更するだけでさまざまなチャートタイプを描画できます。
初期化時にチャート タイプを割り当てる方法:
XAML の場合:
<ig:XamShapeChart x:Name="ShapeChart"
ChartType="Spline" >
</ig:XamShapeChart>
C# の場合:
var ShapeChart = new XamShapeChart
{
ChartType = ShapeChartType.Spline;
}
VB の場合:
Dim ShapeChart = New XamShapeChart() With
{
.ChartType = ShapeChartType.Spline
}
以下の表はチャートと共に生成される DataItems で必要なプロパティについて説明します。
注: Points 列は X/Y オブジェクト一覧のリストです。
以下の例は、各チャート タイプの最小要件です。以下の各データ クラスは、チャートのビジュアル データを描画するプロパティを含みます。
C# の場合:
public class ScatterPoint
{
public double X { get; set; }
public double Y { get; set; }
}
VB の場合:
Public Class ScatterPoint
Private m_X As Double
Public Property X() As Double
Get
Return m_X
End Get
Set
m_X = Value
End Set
End Property
Private m_Y As Double
Public Property Y() As Double
Get
Return m_Y
End Get
Set
m_Y = Value
End Set
End Property
End Class
C# の場合:
public class ScatterValue
{
public double X { get; set; }
public double Y { get; set; }
public double V { get; set; }
}
VB の場合:
Public Class ScatterValue
Private m_X As Double
Public Property X() As Double
Get
Return m_X
End Get
Set
m_X = Value
End Set
End Property
Private m_Y As Double
Public Property Y() As Double
Get
Return m_Y
End Get
Set
m_Y = Value
End Set
End Property
Private m_V As Double
Public Property V() As Double
Get
Return m_V
End Get
Set
m_V = Value
End Set
End Property
End Class
C# の場合:
public class ScatterBubble
{
public double X { get; set; }
public double Y { get; set; }
public double R { get; set; }
public double Fill { get; set; } // an optional value
}
VB の場合:
Public Class ScatterBubble
Private m_X As Double
Public Property X() As Double
Get
Return m_X
End Get
Set
m_X = Value
End Set
End Property
Private m_Y As Double
Public Property Y() As Double
Get
Return m_Y
End Get
Set
m_Y = Value
End Set
End Property
Private m_R As Double
Public Property R() As Double
Get
Return m_R
End Get
Set
m_R = Value
End Set
End Property
Private m_Fill As Double ' an optional value
Public Property Fill() As Double
Get
Return m_Fill
End Get
Set
m_Fill = Value
End Set
End Property
End Class
C# の場合:
public class ScatterShape
{
public List<List<Point>> Points { get; set; }
// a nested list of list of points
}
VB の場合:
Public Class ScatterShape
Public Property Points() As List(Of List(Of Point))
Get
Return m_Points
End Get
Set
m_Points = Value
End Set
End Property
Private m_Points As List(Of List(Of Point))
' a nested list of list of points
End Class