PDA

Click to See Complete Forum and Search --> : MS Chart axis and labels


kida
Apr 16th, 2001, 07:57 PM
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 ! :cool:

British Bob
Jan 14th, 2002, 05:26 AM
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 :rolleyes:

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.
;)