Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I right justify x-axis labels?

Hi all, my x-axis labels, when displayed vertically, are all left justified so some of them are a long way from the actual axis line.

does anyone know if its possible to change the alignment of them?

Thanks in advance,

Matt

8 Replies
vgutkovsky
Master II
Master II

Left-justified in relation to what? Can you post a screenshot please?

Regards,

Not applicable
Author

here you go.

as you can see from where I put the arrow. I would like these aligned to the x-axis if possible..

any ideas?

Thanks,

Matt

vgutkovsky
Master II
Master II

Ah, I see. I don't know of a way to align those to the right//top. But try Presentation --> Limit Legend and see if that gives you the result you're after (or something acceptable).

Regards,

Not applicable
Author

HI,

You can change the dimension labels in axis tab in chart properties window..

As I think, because of the different label lengths you get this problem... You can just limit label size and then it will be ok... or you can resize the chart to look nice... Or you can arrange the labels in an angle..

I also not aware of any method to align the labels to the top..

Regards,

Nilupa

Not applicable
Author

Hi Matt,

As Nilupa suggests, if you select the oblique option for your labels then they align to the axis. I have had to use this technique to achieve right justification, but sadly I've not been able to find any way to adjust the angle of the label.

Sophie

(using v9.0 SR4)

dgreenberg
Partner - Specialist
Partner - Specialist

Remember if trying to align the labels and padding with spaces you must use a non-proportional font like Courier New for the dimension label of the axis otherwise A with 5 spaces won't align with ABCDEF.

Combining that with a simple expression on the dimension like:

=if(len(myStringValue)<vMaxLenMyStringValue,  repeat(' ',(vMaxLenMyStringValue-len(myStringValue)))&myStringValue, myStringValue)

vMaxLenMyStringValue simply contains =max(len(MyStringValue))

Yielded perfect results for me.

rightJustified labels.png

veidlburkhard
Creator III
Creator III

Hi Matthew,

if it is ok for you why don't you change the orientation (on the 'Style' tab of the 'Chart Properties') to horizontally. This looks way better...

Hope this helps

Burkhard

veidlburkhard
Creator III
Creator III

...or, what about this view:

LabelVertical.jpg

Could this be an option?

Regards

Burkhard