Hi,
I am using RadChart as user control and need to use the control to load different Chart Types.I am able to load the Chart Types but unable to display them as loaded.
this is my aspx page and in the code behind I am using the following code to Build the Graph.
I am able to get the chart generated but getting the same chart type at the end..
For Suppose
and for i=0
and for i=1
I need the chart as pie Graph and Line Graph to be displayed in my page.But I am able to dispaly only one of the chart type i.e, for
Please help me out with your suggestions.
Thanks In Advance,
h@r!
I am using RadChart as user control and need to use the control to load different Chart Types.I am able to load the Chart Types but unable to display them as loaded.
<
telerik:RadChart
ID
=
"rcTrendGraph"
runat
=
"server"
></
telerik:RadChart
>
this is my aspx page and in the code behind I am using the following code to Build the Graph.
for (int i = 0; i < strContentIds.Length; i++){
strDashContId = strContentIds[i].ToString();
if (strDashContId == "TGI1002"){
//Bar Graph
rcTrendGraph.ChartTitle.TextBlock.Text = "Bar Graph";
rcTrendGraph.ChartTitle.Appearance.Position.AlignedPosition=Telerik.Charting.Styles.AlignedPositions.Top;
rcTrendGraph.AddChartSeries(legend);
legend.Type = Telerik.Charting.ChartSeriesType.Bar;
rcTrendGraph.DataSource =ds;
rcTrendGraph.DataBind();
}
else if (strDashContId == "TGI1003"){
//Pie Graph
rcTrendGraph.ChartTitle.TextBlock.Text = "Pie Graph";
rcTrendGraph.ChartTitle.Appearance.Position.AlignedPosition=Telerik.Charting.Styles.AlignedPositions.Top;
rcTrendGraph.AddChartSeries(legend);
legend.Type = Telerik.Charting.ChartSeriesType.Pie;
legend.AddItem(10,"A");
legend.AddItem(20,"B");
legend.AddItem(30,"C");
legend.AddItem(40,"D");
}
else if (strDashContId == "TGI1001")
{//Line Graph
rcTrendGraph.ChartTitle.TextBlock.Text = "Line Graph";
rcTrendGraph.ChartTitle.Appearance.Position.AlignedPosition=Telerik.Charting.Styles.AlignedPositions.Top;
rcTrendGraph.AddChartSeries(legend);
legend.Type = Telerik.Charting.ChartSeriesType.Line;
legend.AddItem(10,"A");
legend.AddItem(20,"B");
legend.AddItem(30,"C");
legend.AddItem(40,"D");
}
}
I am able to get the chart generated but getting the same chart type at the end..
For Suppose
strContentIds.Length
=2and for i=0
strDashContId
=TGI1001and for i=1
strDashContId
=TGI1003 I need the chart as pie Graph and Line Graph to be displayed in my page.But I am able to dispaly only one of the chart type i.e, for
strDashContId
=TGI1003 and strDashContId
=TGI1001 I am getting Pie as strContentIds
[1]=TGI1003 after strDashContId
=TGI1001 and getting both the charts as Pie Charts only.Please help me out with your suggestions.
Thanks In Advance,
h@r!