This is a migrated thread and some comments may be shown as answers.

RadChart renders as large red X

1 Answer 58 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dave
Top achievements
Rank 1
Dave asked on 15 Dec 2011, 08:38 AM
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)
        {
            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.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 19 Dec 2011, 08:25 AM
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,
Nikolay
the Telerik teamQ3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
Chart (obsolete as of Q1 2013)
Asked by
Dave
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or