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

Simple data-grouping question

1 Answer 50 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 17 Aug 2009, 04:04 PM
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

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 20 Aug 2009, 08:27 AM
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.
Tags
Chart (Obsolete)
Asked by
Ed
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or