Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Chart > RadChart renders as large red X

Not answered RadChart renders as large red X

Feed from this thread
  • Dave Dave's avatar

    Posted on Dec 15, 2011 (permalink)

    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.

    Reply

  • Nikolay Nikolay admin's avatar

    Posted on Dec 19, 2011 (permalink)

    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.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Chart > RadChart renders as large red X
Related resources for "RadChart renders as large red X"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]