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

can bind the series automatically?

1 Answer 112 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ocean Ju
Top achievements
Rank 1
Ocean Ju asked on 06 Dec 2011, 04:20 AM
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.


1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 08 Dec 2011, 02:29 PM
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 >>

Tags
ChartView
Asked by
Ocean Ju
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or