This is a migrated thread and some comments may be shown as answers.

How to bind more than one collection to just one RadChart declaratively?

1 Answer 40 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Przemyslaw
Top achievements
Rank 1
Przemyslaw asked on 05 Mar 2010, 09:49 AM
Hi,

Let's say that I have two collections in my ViewModel layer:

ObservableCollection<DayEntry> Logins; 
ObservableCollection<DayEntry> Deposits; 
where:
public class DayEntry { 
   public DateTime day { getset; } 
   public int value { getset; } 

Now, I would like to bind both of these collections to just one RadChart as two Data Series declaratively with XAML.

I would like to avoid creating a third, composite collection called something like LoginsAndDeposits that would combine both data sources:
public class DayEntry { 
    public DateTime day {getset;} 
    public int loginValue { getset; } 
    public int depositsValue { getset; } 

Is that possible, and if yes, how?

regards, Przemek



1 Answer, 1 is accepted

Sort by
0
Accepted
Velin
Telerik team
answered on 09 Mar 2010, 02:40 PM
Hi Przemyslaw,

I'm afraid you will need to nest your collections into a composite one that will serve as items source for the chart control.

Greetings,
Velin
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
Chart
Asked by
Przemyslaw
Top achievements
Rank 1
Answers by
Velin
Telerik team
Share this question
or