Hey guys,
I'm trying to use the Telerik Chart Control after purchasing the ASP.NET Ajax control yesterday from yourselves, but i can't seem to get the bar chart to be stacked...
Here is my code: (ASP.NET)
and my c#:
my sql query produces these results:
Description Count Username
Passed back to sales - query log 1 TAtest
Rejected 2 TAtest
Telesales Assigned TA 1 TAtest
I want the y-axis to be 10-300 in steps of 10.. min of 10
I want the x-axis to be the username
and the count of each Description to be each bar stacked per username..
Please see attachment of what i'm currently getting..
Thanks for any help,
Regards,
Michael
I'm trying to use the Telerik Chart Control after purchasing the ASP.NET Ajax control yesterday from yourselves, but i can't seem to get the bar chart to be stacked...
Here is my code: (ASP.NET)
<
telerik:RadChart
ID
=
"RadChart1"
runat
=
"server"
DefaultType
=
"StackedBar"
>
<
PlotArea
>
<
YAxis
MaxValue
=
"300"
Step
=
"10"
AutoScale
=
"True"
AxisMode
=
"Extended"
>
</
YAxis
>
</
PlotArea
>
<
Series
>
</
Series
>
</
telerik:RadChart
>
and my c#:
string
sql =
string
.Format(
"..."
);
DataTable openLeads = db.FillTable(sql);
if
(openLeads.Rows.Count > 0)
{
RadChart1.DataSource = openLeads;
foreach
(DataRow row
in
openLeads.Rows)
{
ChartSeries chrtSeries =
new
ChartSeries {Name = row[
"Description"
].ToString()};
chrtSeries.Type = ChartSeriesType.StackedBar;
RadChart1.SeriesOrientation = ChartSeriesOrientation.Vertical;
RadChart1.Series.Add(chrtSeries);
}
RadChart1.PlotArea.XAxis.DataLabelsColumn =
"UserName"
;
RadChart1.DataBind();
}
my sql query produces these results:
Description Count Username
Passed back to sales - query log 1 TAtest
Rejected 2 TAtest
Telesales Assigned TA 1 TAtest
I want the y-axis to be 10-300 in steps of 10.. min of 10
I want the x-axis to be the username
and the count of each Description to be each bar stacked per username..
Please see attachment of what i'm currently getting..
Thanks for any help,
Regards,
Michael