Note that when you set the ValueBinding and CategoryBinding properties in Xaml they will expect strings with a valid property name. For example:
<telerik:LineSeries CategoryBinding="Price"
ValueBinding="Count"
ItemsSource="{Binding RecordsSorted}"/>
When you bind them like in the provided code snippet you are passing them the numbers contained in the Price and Count properties which are not valid property names.
However, the above code snippet won't work in your scenario. Instead of this you can create the value and category bindings in code-behind. The RadChartView has two data-binding mechanisms: PropertyNameDataPointBinding and GenericDataPointBinding. These two classes derive from the DataPointBinding base class. In order to bind correctly the values from your Dictionary you can use the GenericDataPointBinding. Here is an example in code:
this.series.ValueBinding = new GenericDataPointBinding<KeyValuePair<string, DataItem>, double>
{
ValueSelector = (item) => item.Value.Count
};
this.series.CategoryBinding = new GenericDataPointBinding<KeyValuePair<string, DataItem>, double>
The KeyValuePair<string, DataItem> is the record from your dictionary and double is the type that should be passed to the series.
In addition I prepared a small project demonstrating this approach. Please give it a try and let me know if I am missing something.
Regards,
Martin
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.