This question is locked. New answers and comments are not allowed.
Hello,
I try to use the chart with Line serie on a collection of a complex type.
In my ViewModel, i have an ObservableCollection<NumerizationOperatorByDate> OperatorsByDate with that :
Ok and in my View, i have that :
In fact, i want a line for each NumerizationOperator and in X axis, DateTimes and in Y axis, int.
Where i'm wrong ?
Best regards,
Guillaume
I try to use the chart with Line serie on a collection of a complex type.
In my ViewModel, i have an ObservableCollection<NumerizationOperatorByDate> OperatorsByDate with that :
public class NumerizationOperatorByDate { public string FullName { get; set; } public List<NumerizationFoldersByDate> NbFoldersProcessedByDate { get; set; } }public class NumerizationFoldersByDate : ReturnObject { public DateTime Date { get; set; } public int NbFoldersProcessed { get; set; } }Ok and in my View, i have that :
<telerik:RadChart ItemsSource="{Binding OperatorsByDate}" Content="" BorderBrush="Black" Width="400" Height="300" BorderThickness="0" d:LayoutOverrides="HorizontalMargin"> <telerik:RadChart.SeriesMappings> <telerik:SeriesMapping> <telerik:SeriesMapping.SeriesDefinition> <telerik:LineSeriesDefinition /> </telerik:SeriesMapping.SeriesDefinition> <telerik:ItemMapping DataPointMember="XValue" FieldName="NbFoldersProcessedByDate.Date /> <telerik:ItemMapping DataPointMember="YValue" FieldName="NbFoldersProcessedByDate.NbFoldersProcessed /> </telerik:SeriesMapping> </telerik:RadChart.SeriesMappings> <telerik:RadChart.DefaultView> <telerik:ChartDefaultView ChartLegendPosition="Bottom"> <telerik:ChartDefaultView.ChartArea> <telerik:ChartArea SmartLabelsEnabled="true" Margin="0 /> </telerik:ChartDefaultView.ChartArea> <telerik:ChartDefaultView.ChartLegend> <telerik:ChartLegend Visibility="Collapsed /> </telerik:ChartDefaultView.ChartLegend> </telerik:ChartDefaultView> </telerik:RadChart.DefaultView> </telerik:RadChart>In fact, i want a line for each NumerizationOperator and in X axis, DateTimes and in Y axis, int.
Where i'm wrong ?
Best regards,
Guillaume