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

2 posts, 1 answers
  1. Przemyslaw
    Przemyslaw avatar
    21 posts
    Member since:
    Oct 2007

    Posted 05 Mar 2010 Link to this post

    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



  2. Answer
    Velin
    Admin
    Velin avatar
    391 posts

    Posted 09 Mar 2010 Link to this post

    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.
Back to Top