can bind the series automatically?

2 posts, 0 answers
  1. Ocean Ju
    Ocean Ju avatar
    7 posts
    Member since:
    Mar 2010

    Posted 05 Dec 2011 Link to this post

    the sample data like this:
    List<Product> products = new List<Product>();
    class Product {
            public string Name {get;set;}
            public double Price {get;set;}
            public DateTime PDate {get;set}
    }
    the data like this:
    Name    Price    PDate
    Car        10        2011-11-1
    Car         11       2011-11-2
    Car          13      2011-11-3
    Ship        15       2011-11-1
    Ship        12       2011-11-2
    Ship        14       2011-11-3

    I want to bind that data to ChartView  and it can generate two series automatically(one series is for Car, other is for Ship), the Price is YValue and the PDate is XValue.

    Is it possible.
    if not, how to automatically generate series by binding, not by code.
    thanks.


  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 08 Dec 2011 Link to this post

    Hi,

    Please, find attached a small example, showing how to achieve the desired result.

    Best regards,
    Ves
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
Back to Top