Hello,
I am trying to use the RadChart to bind to a Nested Collection. I would like every member of the parent collection to represent a spline series that has a property named CollectionName property to bind to the Legend Label. Then I want to have each child collection have its members mapped to the points along the spline. This code works:
However, I have to have a SeriesMapping for every collection that is added which is undesirable and the LegendLabel does not display the collection name. Is there a way in XAML to set up a template for the series and have them automatically added and removed when the collection changes? Or do I have to do it all manually in code behind?
I am trying to use the RadChart to bind to a Nested Collection. I would like every member of the parent collection to represent a spline series that has a property named CollectionName property to bind to the Legend Label. Then I want to have each child collection have its members mapped to the points along the spline. This code works:
<Telerik:RadChart ItemsSource="{Binding Path=SeriesCollection,Mode=TwoWay}" x:Name="chartcontentseries" >
<telerik:RadChart.DefaultSeriesDefinition>
<telerik:SplineSeriesDefinition></telerik:SplineSeriesDefinition>
</telerik:RadChart.DefaultSeriesDefinition>
<telerik:RadChart.SeriesMappings>
<telerik:SeriesMapping CollectionIndex="0" LegendLabel="{Binding Path=CollectionName}">
(I have to have this set) (This does not display the collection name!)
<telerik:ItemMapping FieldName="Percentage" DataPointMember="YValue"></telerik:ItemMapping>
</telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>
</telerik:RadChart>
However, I have to have a SeriesMapping for every collection that is added which is undesirable and the LegendLabel does not display the collection name. Is there a way in XAML to set up a template for the series and have them automatically added and removed when the collection changes? Or do I have to do it all manually in code behind?