I have a problem with Rad Chart. My chart shows properly if i dont use following line of code
Consider if have used following data table
And i used following code to generate rad chart
RadChart1.PlotArea.XAxis.DataLabelsColumn =
"BranchName"
;
Consider if have used following data table
private
DataTable GeneratedData()
{
DataTable dt =
new
DataTable();
dt.Columns.Add(
"Asset"
);
dt.Columns.Add(
"Liability"
);
dt.Columns.Add(
"Income"
);
dt.Columns.Add(
"BranchId"
);
dt.Columns.Add(
"BranchName"
);
DataRow dr = dt.NewRow();
dr[0] =
"052"
;
dr[1] =
"-25"
;
dr[2] =
"45"
;
dr[3] =
"1001"
;
dr[4] =
"Corporate"
;
dt.Rows.Add(dr);
dr = dt.NewRow();
dr[0] =
"161"
;
dr[1] =
"29"
;
dr[2] =
"35"
;
dr[3] =
"1002"
;
dr[4] =
"IDB"
;
dt.Rows.Add(dr);
return
dt;
}
And i used following code to generate rad chart
RadChart1.DataSource = GeneratedData();
RadChart1.DataManager.ValuesYColumns =
new
string
[3] {
"Asset"
,
"Liability"
,
"Income"
};
RadChart1.DataManager.ValuesXColumn =
"BranchId"
;
RadChart1.PlotArea.XAxis.DataLabelsColumn =
"BranchName"
;
RadChart1.PlotArea.XAxis.AddRange(1001,1002,1);
RadChart1.PlotArea.XAxis.AutoScale =
false
;
RadChart1.DataBind();
If I dont define DatalabelsColumn then chart shows correctly. but I want to show Lable from BranchName column. How i can do this. Need your help.