Results 1 to 2 of 2

Thread: MS Chart axis and labels

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Location
    Sydney
    Posts
    3

    Question

    Hi everyone,

    I am actually working on a program using MS Chart quite intensively which is a bit of a pain sometimes, especially to find some information about it...

    I am plotting several curves from a datagrid control, i programmed a dynamic zoom and some other features. my current problems are the following :

    1) sometimes the horizontal axis labes switch from horizontal to vertical, depending on the number of points on the plot. I would like to force it to stay horizontal, but I can't find the property that could fix it.

    2) I would like to be able to use 2 different vertical axis with 2 different scales properties. I know how to create a second vertical axis but i can't create its own scaling property, i mean it uses the same one of the first axis. I think that it must be pretty easy but I can't find it, so if anyone could help me on this that would be great !!!

    cheers from Australia,

    Vincent !
    :-)

  2. #2
    New Member
    Join Date
    Jan 2002
    Location
    Birmingham
    Posts
    1

    Smile

    Just a quick response to problems

    try this code:

    Just replace msChart1 with the name of your chart

    '--------------------------------------------------------------------

    With msChart1.Plot.Axis(VtChAxisIdX).Labels(1)
    .Standing = False
    .TextLayout.Orientation = VtOrientationHorizontal
    .Auto = False
    End With

    '--------------------------------------------------------------------

    Took me ages to work that one out

    And for query 2

    '--------------------------------------------------------------------
    With MSChart1.Plot.Axis(VtChAxisIdY2).ValueScale
    .Auto = False
    'Just replace these values with your own
    .ValueScale.Minimum = 1
    .ValueScale.Maximum = 50
    End With
    '--------------------------------------------------------------------

    Let me know if this works.

    Cheers

    Bob.

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