This question is locked. New answers and comments are not allowed.
I have a RadChart and have used the documentation here :http://www.telerik.com/help/winforms/chart-building-radcharts-creating-radchart-programmatically-more-complex-example.html to create what I need. However, the RadChart does not display the data, leaving only a large red X in its place. This is the constructor for my form:
No exception is thrown, no errors and the data is constructed properly. I have no idea on what to do next.
public
ReportPreview(CalculationResults results)
{
InitializeComponent();
ReportChart.ChartTitle.TextBlock.Text = @
"Report"
;
ReportChart.Series.Clear();
var chartSeriesA =
new
ChartSeries {Type = ChartSeriesType.Bezier, Name = @
"Elevation"
};
chartSeriesA.Appearance.LineSeriesAppearance.Color = Color.DarkBlue;
chartSeriesA.Appearance.PointMark.Dimensions.Width = 5;
chartSeriesA.Appearance.PointMark.Dimensions.Height = 5;
chartSeriesA.Appearance.PointMark.FillStyle.MainColor = Color.Black;
chartSeriesA.Appearance.PointMark.Visible =
true
;
var chartSeriesB =
new
ChartSeries {Type = ChartSeriesType.Bezier, Name = @
"Predicted Elevation"
};
chartSeriesB.Appearance.LineSeriesAppearance.Color = Color.DarkBlue;
chartSeriesB.Appearance.PointMark.Dimensions.Width = 5;
chartSeriesB.Appearance.PointMark.Dimensions.Height = 5;
chartSeriesB.Appearance.PointMark.FillStyle.MainColor = Color.Black;
chartSeriesB.Appearance.PointMark.Visible =
true
;
for
(
int
i = 0; i < results.CurveFittingDataList.Count; i++)
{
chartSeriesA.AddItem(
new
ChartSeriesItem((
double
)results.CurveFittingDataList[i].AngularLoc, (
double
)results.CurveFittingDataList[i].Elevation));
chartSeriesB.AddItem(
new
ChartSeriesItem((
double
)results.CurveFittingDataList[i].AngularLoc, (
double
)results.CurveFittingDataList[i].PredictedElevation));
}
ReportChart.Series.Add(chartSeriesA);
ReportChart.Series.Add(chartSeriesB);
ReportChart.PlotArea.XAxis.AxisLabel.TextBlock.Text = @
"Location Angle"
;
ReportChart.PlotArea.YAxis.AxisLabel.TextBlock.Text = @
"Elevation"
;
ReportChart.Update();
}
No exception is thrown, no errors and the data is constructed properly. I have no idea on what to do next.