Hello,
I'm evaluating RadChart and I'm not sure if it is my ticket to success... The facts at hand:
There is an entity with columns as shown here: Lap, Time, Speed, Brake, etc. Sample data with 5 snapshots (I don't know the number of laps):
0, 1256, 56, 10
0, 1456, 55, 0
0, 2156, 63, 0
1, 5512, 121, 54
1, 5699, 110, 96
My attempt is to group the data by "Lap" and visualize each group in a SplineSeriesDefinition. Next, the user can enable/disable a group as shown here: http://demos.telerik.com/silverlight/#Chart/SimpleFiltering
A MainViewModel exposes this:
public ObservableCollection<ParameterInspectionViewModel> Snapshots{ get { return _snapshots; } set { if (_snapshots != value) { _snapshots = value; RaisePropertyChanged(() => Snapshots); } }}A data item is wrapped in this class:
public class ParameterInspectionViewModel : ViewModelBase{public RaceData Model{get;private set;}public ParameterInspectionViewModel(RaceData model){Model = model;}public const string DirtyVisibilityPropertyName = "DirtyVisibility";private Visibility _dirty = Visibility.Collapsed;...}Here is my RadChart:
<telerik:RadChart x:Name="SingleLapChart" ItemsSource="{Binding Snapshots}"> <telerik:RadChart.SeriesMappings> <telerik:SeriesMapping> <telerik:SeriesMapping.SeriesDefinition> <telerik:SplineSeriesDefinition></telerik:SplineSeriesDefinition> </telerik:SeriesMapping.SeriesDefinition> <telerik:SeriesMapping.GroupingSettings> <telerik:GroupingSettings ShouldCreateSeriesForLastGroup="True"> <telerik:GroupingSettings.GroupDescriptors> <telerik:ChartGroupDescriptor Member="Model.Lap"/> </telerik:GroupingSettings.GroupDescriptors> </telerik:GroupingSettings> </telerik:SeriesMapping.GroupingSettings> <telerik:SeriesMapping.ItemMappings> <telerik:ItemMapping DataPointMember="XValue" FieldName="Model.Time"></telerik:ItemMapping> <telerik:ItemMapping DataPointMember="YValue" FieldName="Model.Speed"></telerik:ItemMapping> </telerik:SeriesMapping.ItemMappings> </telerik:SeriesMapping> </telerik:RadChart.SeriesMappings>I can't use the Visibility property since the DataContext isn't that of the rendered group:
<telerik:SeriesMapping.SeriesDefinition> <telerik:SplineSeriesDefinition Visibility="Visible" /></telerik:SeriesMapping.SeriesDefinition>Does anybody have a solution to this issue?
Thank You,
Roger
