xmlns:ig="http://schemas.infragistics.com/xaml"
This topic explains, with code examples, how to configure which properties are displayed in the XamCategoryChart control.
By default, the XamCategoryChart will plot all properties that exist on the underlying data items in the bound ItemsSource collection. This topic will inform you on how to pick which properties are plotted in the chart.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
You can include and exclude properties from the XamCategoryChart by setting the following properties:
The following code example uses the Energy Data Source sample code as its ItemsSource and shows how to achieve the following chart both by including and excluding properties.
In XAML
xmlns:ig="http://schemas.infragistics.com/xaml"
In XAML
<ig:XamCategoryChart x:Name="chart1" ItemsSource="{Binding}" IncludedProperties="Country,Hydro,Nuclear"/>
In XAML
<ig:XamCategoryChart x:Name="chart1" ItemsSource="{Binding}" ExcludedProperties="Coal,Oil,Gas"/>
In C#
string[] inclusion = { "Country", "Hydro", "Nuclear" };
chart1.IncludedProperties = inclusion;
In C#
string[] exclusion = { "Coal", "Oil", "Gas" };
chart1.ExcludedProperties = exclusion;
In Visual Basic
Dim inclusion As String() = {"Country", "Hydro", "Nuclear"}
chart1.IncludedProperties = inclusion
In Visual Basic
Dim inclusion As String() = {"Coal", "Oil", "Gas"}
chart1.ExcludedProperties = exclusion