RadChart renders as large red X

2 posts, 0 answers
  1. Dave
    Dave avatar
    7 posts
    Member since:
    Oct 2010

    Posted 15 Dec 2011 Link to this post

    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:

    public ReportPreview(CalculationResults results)
                ReportChart.ChartTitle.TextBlock.Text = @"Report";
                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.PlotArea.XAxis.AxisLabel.TextBlock.Text = @"Location Angle";
                ReportChart.PlotArea.YAxis.AxisLabel.TextBlock.Text = @"Elevation";

    No exception is thrown, no errors and the data is constructed properly. I have no idea on what to do next.
  2. Nikolay
    Nikolay avatar
    384 posts

    Posted 19 Dec 2011 Link to this post

    Hello Dave,

    Unfortunately, it is hard for us to determine what the cause might be based on the information provided. Could you, please, open a support ticket and send us a sample runnable application, which demonstrates the issue, so that we can debug it locally and provide further support.

    All the best,
    the Telerik teamQ3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. DevCraft banner
Back to Top