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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
SchaeubleC
Contributor
Contributor

Center Text on Org Charts

Is there a way to center the text contained in my org charts?

Labels (1)
1 Solution

Accepted Solutions
Dalton_Ruer
Support
Support

There is no way to simply use a "center" alighment type thing. However, you can simulate that by adjusting what you display. I've found that if I calculate the length of the string I want to display, and subtract that from 30, I can prefix the string with half that difference using the ascii character 160, just like a space. 

Repeat(chr(160), Floor((30-Len(Centre_Name))/2)) & Centre_Name

In the image notice what just displaying Centre_Name shows, versus what it looks like with the prefix.

CenteredOrg.png

 

**** NOTE: Notice how the field values aren't sorted because I just used the default sort order. So be sure to apply a sort expression to use the regular field value itself rather than letting it sort on the expression that prefixes the display. 

 

 

View solution in original post

1 Reply
Dalton_Ruer
Support
Support

There is no way to simply use a "center" alighment type thing. However, you can simulate that by adjusting what you display. I've found that if I calculate the length of the string I want to display, and subtract that from 30, I can prefix the string with half that difference using the ascii character 160, just like a space. 

Repeat(chr(160), Floor((30-Len(Centre_Name))/2)) & Centre_Name

In the image notice what just displaying Centre_Name shows, versus what it looks like with the prefix.

CenteredOrg.png

 

**** NOTE: Notice how the field values aren't sorted because I just used the default sort order. So be sure to apply a sort expression to use the regular field value itself rather than letting it sort on the expression that prefixes the display.