Hello,
I am running into two problems, which I think might be connected. I have a data table with about 25 values. Currently, the Chart is only showing 8 of them. Previously, when I defined the Series in the .aspx page, setting AutoLayout=true would fix this problem. But now that I am setting AutoLayout in the code-behind, I cannot get it to show all my values.
Secondly, I have the "PlotArea.XAxis.DataLabelsColumn" value defined to one of my columns, but it never shows the values (which are date/times). I only see the numbers 0-7 for my Data Labels.
Any suggestions appreciated. I have made many variations to the code below, without finding a solution, including setting both the DataLabelsColumn and AutoLayout in both the aspx and c# code.
Thanks
I am running into two problems, which I think might be connected. I have a data table with about 25 values. Currently, the Chart is only showing 8 of them. Previously, when I defined the Series in the .aspx page, setting AutoLayout=true would fix this problem. But now that I am setting AutoLayout in the code-behind, I cannot get it to show all my values.
Secondly, I have the "PlotArea.XAxis.DataLabelsColumn" value defined to one of my columns, but it never shows the values (which are date/times). I only see the numbers 0-7 for my Data Labels.
Any suggestions appreciated. I have made many variations to the code below, without finding a solution, including setting both the DataLabelsColumn and AutoLayout in both the aspx and c# code.
Thanks
<asp:Button ID="Button1" runat="server" style="text-align: center" onclick="Button1_Click" Text="Generate Chart" /><telerik:RadChart ID="RadChart1" runat="server" Visible="True" AutoLayout="true"> <PlotArea> <XAxis DataLabelsColumn="TimeSampled"> </XAxis> </PlotArea> <ChartTitle Visible="false" /></telerik:RadChart>protected void Button1_Click(object sender, EventArgs e){ RadChart1.AutoLayout= true; RadChart1.Height=450; RadChart1.Width=950; RadChart1.SeriesOrientation = ChartSeriesOrientation.Vertical; RadChart1.DefaultType = ChartSeriesType.Line; RadChart1.ClientSettings.ScrollMode = ChartClientScrollMode.Both; RadChart1.ClientSettings.EnableZoom = true; ChartSeries testSeries = new ChartSeries("Pages/sec", ChartSeriesType.Line); RadChart1.AddChartSeries(testSeries); RadChart1.Series[0].DataYColumn = "SampleValue"; RadChart1.Series[0].Type = ChartSeriesType.Line; RadChart1.Series[0].Appearance.LabelAppearance.RotationAngle = 90; RadChart1.PlotArea.YAxis.AxisMode = ChartYAxisMode.Extended; RadChart1.PlotArea.XAxis.AutoScale = false; RadChart1.PlotArea.XAxis.DataLabelsColumn = "TimeSampled"; RadChart1.DataSourceID = "ChartData"; RadChart1.DataBind();}