Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Primary Dimensions Labels

Hi,

Is it possible to change the Primary Dimensions Labels angle/orientation of a (bar) chart with a VBScript macro?

Just as you would do in the property windows by selecting the "-", "/" or "|" modes!

Thanks, in advance, for your answers.

Lilian

1 Solution

Accepted Solutions
Not applicable
Author

Thanks a lot BlackRockS, that's what I wanted!

Cheers

-- Lilian

View solution in original post

6 Replies
Not applicable
Author

Hi,

See if the attached sample can help you.

Cheers.

Not applicable
Author

Thanks for the quick answer BlackRockS.

I did find something interesting in your exemple but actually I've noticed that I was incomplete in my post!

What I try to do by macro is to change the primary (or secondary) dimension label orientation like you can do in the property box, you know the "-", "/" or "|" modes!

Thanks again BlackRockS.

Not applicable
Author

Hi,

See if the attached sample can help you.

Cheers.

Not applicable
Author

Thanks a lot BlackRockS, that's what I wanted!

Cheers

-- Lilian

Not applicable
Author

lilian You must mark blackrocks answer right, not your reply

Not applicable
Author

Just in case people have personal edition and can't open the file... this is the macro from the above attachment.

sub tst()

set chart = ActiveDocument.Sheets("Main").CreateBarChart

chart.AddDimension "Clients"

chart.AddExpression "sum(ConsultingAmount)"

set p = chart.GetProperties

'p.ChartProperties.MajorDimensionTextMode = 0   'horizontal -

'p.ChartProperties.MajorDimensionTextMode = 1   'vertical |

p.ChartProperties.MajorDimensionTextMode = 2   'inclined /

chart.SetProperties p

end sub