Or ObservableCollection<Decimal> instead of the list<Decimal>.
Thank you for one simple example please
0
Martin Ivanov
Telerik team
answered on 24 Sep 2015, 09:58 AM
Hi Thomas,
Can you please tell me what chart type you are using? If you want to display your data in a Cartesian or polar chart you should keep in mind that those types of charts visualize two dimensional data and it won't work with a collection of Double values. The chart's series will expect to get two(or more) values values from its ItemsSource's objects. One for the horizontal and another for the vertical axis. If the series is bubble series you will also have to provide a third value for the volume of the data points. You can read more about populating a chart in the Create Data-Bound Chart help article.
On the other side the pie chart's series can display single dimensional data by just setting its ItemsSource to a collection of doubles. Here is an example:
<telerik:RadPieChart>
<telerik:PieSeries ItemsSource="{Binding}"/>
</telerik:RadPieChart>
this.DataContext = new ObservableCollection<double>() { 2, 8 };
I hope this helps.
Regards,
Martin
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items