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

Data Series from columns

2 Answers 83 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 26 May 2009, 03:25 AM
I have the following linq code...
var CVDOverviewData = from cvdo in pieData.CVDOverviews  
                                  select new  
                                  {  
                                    OverTwentyfive = cvdo.OverTwentyfive,  
                                    OverTwenty = cvdo.OverTwenty,  
                                    OverFifteen = cvdo.OverFifteen,  
                                    OverTen = cvdo.OverTen,  
                                    LessTen = cvdo.LessTen  
                                  }; 

the result is a sinlge row with a column for each range (over25, over20, over15 ...)

How so I get these values into a pie chart?

Sorry if this is a real newbie question.

Cheers in advance.

2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 27 May 2009, 11:24 PM
Anyone?
0
Ves
Telerik team
answered on 28 May 2009, 02:10 PM
Hi Kevin,

Unfortunately, this scenario is not supported by RadChart for the moment. You can find more details about databinding RadChart in this help topic. You can also check this example.

Generally, RadChart will create an item for a given column/property for each record / instance, but it will not loop through an object's properties. In this case you can use a code like this:

RadChart1.ItemsSource = new double[] {  
                        CVDOverviewData.OverTwentyfive,   
                        CVDOverviewData.OverTwenty,  
                        CVDOverviewData.OverFifteen,  
                        ..............  
                        };  


Best regards,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Ves
Telerik team
Share this question
or