This is my first time using HtmlChart and I need a bit of help.
I have bound a grid and chart on the server side. The grid works but the chart doesn't.
Here is the code and attached is a screen capture what I currently getting and what I would like to see.
ASP.NET
<td width="100%" valign="top" align="left">
<telerik:RadHtmlChart ID="barChart" runat="server" Width="600px" Height="200px">
</telerik:RadHtmlChart>
</td>
C#
DataTable dtNetworkCompareResults = dataSet.Tables["NetworkCompareResults"];
radgridSearchResults.DataSource = dtNetworkCompareResults;
radgridSearchResults.Visible = true;
radgridSearchResults.DataBind();
barChart.DataSource = dtNetworkCompareResults;
this.barChart.PlotArea.Series.Clear();
LineSeries networkSeries1 = new LineSeries { DataFieldY = "Total" };
this.barChart.PlotArea.Series.Add(networkSeries1);
LineSeries networkSeries2 = new LineSeries { DataFieldY = "PSC" };
this.barChart.PlotArea.Series.Add(networkSeries2);
LineSeries networkSeries3 = new LineSeries { DataFieldY = "Specialist"};
this.barChart.PlotArea.Series.Add(networkSeries3);
barChart.PlotArea.XAxis.DataLabelsField = "NetworkName";
barChart.PlotArea.XAxis.Name = "NetworkName";
barChart.Legend.Appearance.Visible = true;
barChart.Visible = true;
barChart.DataSource = dtNetworkCompareResults;
barChart.DataBind();
I have bound a grid and chart on the server side. The grid works but the chart doesn't.
Here is the code and attached is a screen capture what I currently getting and what I would like to see.
ASP.NET
<td width="100%" valign="top" align="left">
<telerik:RadHtmlChart ID="barChart" runat="server" Width="600px" Height="200px">
</telerik:RadHtmlChart>
</td>
C#
DataTable dtNetworkCompareResults = dataSet.Tables["NetworkCompareResults"];
radgridSearchResults.DataSource = dtNetworkCompareResults;
radgridSearchResults.Visible = true;
radgridSearchResults.DataBind();
barChart.DataSource = dtNetworkCompareResults;
this.barChart.PlotArea.Series.Clear();
LineSeries networkSeries1 = new LineSeries { DataFieldY = "Total" };
this.barChart.PlotArea.Series.Add(networkSeries1);
LineSeries networkSeries2 = new LineSeries { DataFieldY = "PSC" };
this.barChart.PlotArea.Series.Add(networkSeries2);
LineSeries networkSeries3 = new LineSeries { DataFieldY = "Specialist"};
this.barChart.PlotArea.Series.Add(networkSeries3);
barChart.PlotArea.XAxis.DataLabelsField = "NetworkName";
barChart.PlotArea.XAxis.Name = "NetworkName";
barChart.Legend.Appearance.Visible = true;
barChart.Visible = true;
barChart.DataSource = dtNetworkCompareResults;
barChart.DataBind();