I'm trying to populate a char with StackedBar1003DSeriesDefinition series mapping with data from server.
The application crashe with exception.
The data is list of type:
public class StackBarModel |
{ |
public object XValue { get; set; } |
public int[] YValues { get; set; } |
} |
XValue = {06/04/2010 00:00:00} (DateTime)
YValue = 1,2,2,0,0
The binding is:
<Charting:SeriesMapping.ItemMappings> |
<Charting:ItemMapping DataPointMember="XValue" |
FieldName="XValue" /> |
<Charting:ItemMapping DataPointMember="YValue" |
FieldName="YValue" /> |
</Charting:SeriesMapping.ItemMappings> |
The error is:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E)
Timestamp: Thu, 8 Apr 2010 12:58:15 UTC
Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Windows.Controls.Charting.DataBindingHelper.AssignMappingFieldTypes(QueryableCollectionView dataEngine, SeriesMapping seriesMapping)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessNoGrouping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMapping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMappings(SeriesMappingCollection seriesMappings, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState)
at Telerik.Windows.Controls.Charting.DataBindingHelper.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ISeriesDefinition defaultSeriesDefinition, ChartFilterDescriptorCollection globalFilterDescriptors, ChartSortDescriptorCollection globalSortDescriptors, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings, AxisRangeState axisXRangeState)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData)
at Telerik.Windows.Controls.RadChart.Rebind(Object originalData)
at Telerik.Windows.Controls.RadChart.Rebind()
at Telerik.Windows.Controls.RadChart.OnApplyTemplate()
at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)
Line: 56
Char: 13
Code: 0
Thanks
Adiel