I'm trying to build a bubble chart using a flat data structure and the GroupSettings to set up different groups base on the value of one of the properties. The chart is working fine so far, however I also need to filter the results based on whether the user checks or unchecks that group in the legend. I've seen the SimpleFiltering example, but that one requires separate mappings be added for each category. Since I don't know at design time how many categories my result set will have, that example isn't much use at this point. I'm trying to avoid having to filter the results in code and am looking for a built-in way to accomplish this through the tool if possible. Here's the meat of my XAML at this point. The CustomLevendItemStyle essentially comes directly from the SimpleFiltering example, so I won't bother including that.
<
telerik:RadChart
x:Name
=
"RadBubbleChart"
ItemsSource
=
"{Binding Items}"
Grid.Row
=
"1"
>
<
telerik:RadChart.DefaultView
>
<
chart:ChartDefaultView
ChartLegendPosition
=
"Top"
>
<
chart:ChartDefaultView.ChartLegend
>
<
chart:ChartLegend
x:Name
=
"TopLegend"
LegendItemStyle
=
"{StaticResource CustomLegendItemStyle}"
/>
</
chart:ChartDefaultView.ChartLegend
>
<
chart:ChartDefaultView.ChartArea
>
<
chart:ChartArea
Legend
=
"{Binding ElementName=TopLegend}"
SmartLabelsEnabled
=
"True"
NoDataString
=
"Loading..." /
>
</
chart:ChartDefaultView.ChartArea
>
</
chart:ChartDefaultView
>
</
telerik:RadChart.DefaultView
>
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:BubbleSeriesDefinition
ShowItemLabels
=
"True"
ShowItemToolTips
=
"True"
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
chart:SeriesMapping.GroupingSettings
>
<
chart:GroupingSettings
ShouldCreateSeriesForLastGroup
=
"True"
>
<
chart:ChartGroupDescriptor
Member
=
"Source"
/>
</
chart:GroupingSettings
>
</
chart:SeriesMapping.GroupingSettings
>
<
telerik:SeriesMapping.ItemMappings
>
<
telerik:ItemMapping
FieldName
=
"Y"
DataPointMember
=
"YValue"
/>
<
telerik:ItemMapping
FieldName
=
"BubbleSize"
DataPointMember
=
"BubbleSize"
/>
</
telerik:SeriesMapping.ItemMappings
>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
</
telerik:RadChart
>