PDA

View Full Version : how to display xlabels vertical on chart



circaa
07-27-2006, 07:52 AM
Hi guys,

My chart type is the "xlcolumnclustered"

I want my labels on the x axis to be vertical, to gain space. But only if my seriescollection is larger than a certain number.

So all I want is the line of code to change the labels from horizontal to vertical.

Thanks

Joey

Cyberdude
07-27-2006, 02:48 PM
I'm not sure this is what you want, but here is some code for you to play with:
ActiveSheet.ChartObjects("Chart 22").Activate
ActiveChart.Axes(xlCategory).AxisTitle.Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.ReadingOrder = xlContext
.Orientation = 45 '45 degrees, or use "xlVertical" or "xlHorizontal"
End With
Hope this helps.
Sid