CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Posts
    14

    Question how to plot different x axis values in the same graph of excel automation by MFC?

    Dear Gurus,

    I have some difficulty in automatically plotting several curves in the same graph in excel by MFC.
    In MFC, I automate the chart plot by calling ChartWizard. If the data used to plot sharing the same
    x value, for example, they are listed as x, y1, y2..., it is easy to plot out these curves on the same graph. Then I don't know how to plot these when data are not having the same x value. For instance, x1, y1, x2, y2, ....ChartWizard seems cannot do that automatically. Is there any method I can use to plot y1(x1), y2(x2) on the same graph?

    Thank you!

  2. #2
    Join Date
    Apr 2002
    Location
    Michigan, USA
    Posts
    869

    Re: how to plot different x axis values in the same graph of excel automation by MFC?

    http://www.codeguru.com/forum/showth...riesCollection

    I created the post above seven years ago with Visual Studio 6 on excel 2000.
    The commands might have changed but you will do the same thing in the current version.
    Verere testudinem! (Fear the turtle)

    Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy. -Albert Einstein

    Robots are trying to steal my luggage.

  3. #3
    Join Date
    Mar 2011
    Posts
    14

    Question Re: how to plot different x axis values in the same graph of excel automation by MFC?

    Thanks, Tom!
    It really works in your way. The class names may be different, but the basic idea is the same.
    BTW, do you know is there anyway I can define the axis range in the excel chart in MFC?
    Appreciate your help a lot!

  4. #4
    Join Date
    Apr 2002
    Location
    Michigan, USA
    Posts
    869

    Re: how to plot different x axis values in the same graph of excel automation by MFC?

    I answered this in your other post.

    Tom
    Verere testudinem! (Fear the turtle)

    Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy. -Albert Einstein

    Robots are trying to steal my luggage.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured