Data Series from columns

3 posts, 0 answers
  1. Kevin
    Kevin avatar
    26 posts
    Member since:
    Apr 2009

    Posted 25 May 2009 Link to this post

    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. Kevin
    Kevin avatar
    26 posts
    Member since:
    Apr 2009

    Posted 27 May 2009 Link to this post

    Anyone?
  3. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 28 May 2009 Link to this post

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