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

Rookie Problem

1 Answer 42 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Kadir Kilicoglu
Top achievements
Rank 1
Kadir Kilicoglu asked on 13 Oct 2010, 09:01 AM
Hello,

I am new to all these chart stuff and so it is very hard for me to understand the mechanism underlying those charts. But my superiors want me to show some "simple" charts and after a couple of days reading through the documentation here I am.

What I want to do is simple: show male/female population per city. I think a bar chart is proper. The sample under Demos > Chart > Application Scenarios > Dynamic Data Binding uses a bar chart to show values of categories etc. (the 2nd chart in the sample). I tried to change the code to fit my needs I couldn't.

The query is simple :
SELECT [IdentityCity] AS City, [Sex] AS M/F, COUNT(*) AS Population
FROM [Students]
GROUP BY [IdentityCity],[Sex]
ORDER BY [IdentityCity]

The Cities should be on the X-Axis, the population count should be on the Y-Axis, the series should be male and female which also should be shown in legend. At the end we should have a nice chart showing 2 bars for each city: one for male pop other for female pop..

It isn't so hard, I guess, but I couldn't do it. Do I miss something.

Best regards and thanks for any help.

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 18 Oct 2010, 11:46 AM
Hi Kadir,

I attached  a sample project that fills chart with data from database and shows what you required.
I hope this gets you started properly.

Greetings,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart (Obsolete)
Asked by
Kadir Kilicoglu
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or