locked
Chart Not Showing - not sure why RRS feed

  • Question

  • Hi,
    I have a chart, with 3 chartareas and 3 series defined. Each series is associated with a chartarea. The chart is set as enabled and visible...

    However, when I run the parent app and call chart.Show() I see nothing. Beyond the two variables mentioned it's not clear to me what might be stopping this chart appearing. Note, I have verified that the object loads properly and I can add data. I just don't see it. I also have a more crude chart (3 charts, 1 chararea each and 1 series each) which was my first attempt at using the control and that works fine.

    This is my attempt to improve upon it. Any guidance will be warmly received.


    Regards,
    Dave
    Monday, May 18, 2009 8:32 AM

Answers

  • Hi Dave,

    There are many possible reasons for your chart now showing, but we may be able to narrow it down by starting with your chart that works, and making changes from there.

    You said that you have a working chart with 3 series and 1 chart area.  Can you take that chart, and apply code like this?
                chart1.ChartAreas.Add("NewChartArea1");
                chart1.ChartAreas.Add("NewChartArea2");
                //Leave chart1.Series[0] as it is
                chart1.Series[1].ChartArea = "NewChartArea1";
                chart1.Series[2].ChartArea = "NewChartArea2";
    This will create two chart areas and associate the 2nd and 3rd series with the new chart areas.  I ran this code, and it worked fine.  Can you run it and see what happens?

    Peter
    Monday, May 18, 2009 11:23 PM

All replies

  • Hi Dave,

    There are many possible reasons for your chart now showing, but we may be able to narrow it down by starting with your chart that works, and making changes from there.

    You said that you have a working chart with 3 series and 1 chart area.  Can you take that chart, and apply code like this?
                chart1.ChartAreas.Add("NewChartArea1");
                chart1.ChartAreas.Add("NewChartArea2");
                //Leave chart1.Series[0] as it is
                chart1.Series[1].ChartArea = "NewChartArea1";
                chart1.Series[2].ChartArea = "NewChartArea2";
    This will create two chart areas and associate the 2nd and 3rd series with the new chart areas.  I ran this code, and it worked fine.  Can you run it and see what happens?

    Peter
    Monday, May 18, 2009 11:23 PM
  • Hi,
    Thanks for coming back. I'll take a look at this in the next day. I'm tied up with something else right now.


    Regards,
    Dave
    Thursday, May 21, 2009 3:19 PM
  • Did you ever find a solution to this problem?
    Wednesday, May 26, 2010 2:35 AM