Hi there,
I am struggling with this problem for a few days now and can not get it to work.
In my solution, I have added a RadChart with a SqlDataSource like this:
Code Behind to group the chart:
I am trying to bind a crosstable to the RadChart control but I cannot manage to get it working, you can view the results of my query on the attached file in this post (Untitled.png).
The thing i am trying to do is to get the Year on the X-axis and the corresponsing status grouped by Year for the number of items existing (Value). AS you can see the Statuses are not mapped to the correct Year?
Can somebody help me with this matter?
If i configure it thrue the Chart Wizard it creates statis series items in the code, and the series have to be dynamic because the year/statuses can change in the dba...
Thanks in advance!
Nicolas
I am struggling with this problem for a few days now and can not get it to work.
In my solution, I have added a RadChart with a SqlDataSource like this:
<div>
<telerik:RadChart ID=
"RadChart1"
runat=
"server"
DataSourceID=
"SqlDataSource1"
Height=
"400px"
Skin=
"Vista"
Width=
"800px"
>
</telerik:RadChart>
<asp:SqlDataSource ID=
"SqlDataSource1"
runat=
"server"
ConnectionString=
"<%$ ConnectionStrings:EUD_SD_TodoListConnectionString %>"
SelectCommand=
"select s.Description [Status], DateName( month , DateAdd( month , Month(i.StartC) , 0 ) - 1 ) as [Month], count(*) as [Value] from Items i INNER JOIN Status s ON s.ID = i.StatusID where Year(i.StartC) = 2011 group by s.Description, Month(i.StartC) order by Month(i.StartC) desc"
>
</asp:SqlDataSource>
</div>
Code Behind to group the chart:
RadChart1.DataGroupColumn =
"Status"
;
RadChart1.PlotArea.XAxis.DataLabelsColumn =
"Month"
;
RadChart1.Legend.Appearance.GroupNameFormat =
"#NAME:#VALUE"
;
I am trying to bind a crosstable to the RadChart control but I cannot manage to get it working, you can view the results of my query on the attached file in this post (Untitled.png).
The thing i am trying to do is to get the Year on the X-axis and the corresponsing status grouped by Year for the number of items existing (Value). AS you can see the Statuses are not mapped to the correct Year?
Can somebody help me with this matter?
If i configure it thrue the Chart Wizard it creates statis series items in the code, and the series have to be dynamic because the year/statuses can change in the dba...
Thanks in advance!
Nicolas