Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
How to add a line break to wrap text using custom expression
Solution:
If you are using the Concatenate function to combine two piece of information like Concatenate([Column1], " ", [Column2]) you may want to show the information as table columns or visualization labels and may want to insert a line break to wrap the two strings on different lines. By default, the concatenation will occur with no line breaks.
For example, see the labels in the screenshot below, without a line break. The custom expression used on the Labels axis here is:
Concatenate([Store Name]," ",[Rank])In custom expressions, "\n" is used for adding a line break in text. To add a line break to wrap the text, use either of the following custom expressions:
Concatenate([Column1], "\n ", [Column2])or:
[Column1] & "\n " & [Column2]
In the example above, change the custom expression to either of the following, and the line break will be added in the labels.
Concatenate([Store Name],"\n ",[Rank])or:
[Store Name] & "\n " & [Rank]Doc: Text Functions
Comments
0 comments
Article is closed for comments.