Simple data-grouping question

Thread is closed for posting
2 posts, 0 answers
  1. Ed
    Ed avatar
    124 posts
    Member since:
    Jan 2008

    Posted 17 Aug 2009 Link to this post

    Hi there,

    I have a very basic question about data grouping that I cannot find an answer to in the on-line demos.  Suppose I have the following data:

    Age      Gender
    ----       ----------

    30        M
    40        F
    50        M
    30        F
    40        M
    50        F
    30        M
    40        F
    50        M

    I need to display the number of men and women in each age category in a graph similar to the one at the top of http://demos.telerik.com/aspnet-ajax/chart/examples/functionality/datatable/defaultcs.aspx.  In other words, I need the x-axis to have three points labelled 30, 40 and 50, and then two columns for each point with the y-values indicating the total numbers (so for x = 30, we have y = 2 for Men and y = 1 for Women, and so on).

    Please give me step-by-step instructions for how to do this, or point me to the relevant place in the documentation.  I have struggled for the last two hours and so far have not managed to understand the charting API from the on-line examples.

    Thanks,

    Ed Graham

  2. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 20 Aug 2009 Link to this post

    Hi Ed,

    I am afraid RadChart will not support this kind of data manipulation. Grouping in RadChart is described in this help topic. Note, that grouping in RadChart results in items grouped in series, while the item values are still the ones from the datasource. You will need to query your data, so that the count is present and send the modified view to the chart.

    Greetings,
    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