Loading

Text Wrap Not Applied for Labels

Publiseringsdato: Apr 30, 2025
Beskrivelse
Wrapping text labels displayed on a stacked bar chart by [Format] > [Alignment] > [Wrap] > [On] menu may not work as expected.

[Format] > [Alignment]  menu
 User-added image
Løsning

Using a string function (eg:  LEFT() , MID())  to break up the long label string into short sub-strings can be accomplished by creating calculation fields and then displaying sub-strings one by one vertically on the bar chart.  Follow along with a sample packaged workbook found in the Attachments section of this article.

Information about string functions is available in Tableau Online Help.

Example:
1. Create calculation field [Substring1]
LEFT([Text Label],15)

2. Create calculation field [Substring2]
MID([Text Label],FIND([Text Label],",")+1,14)

3. Place [Substring1] and [Substring2] on [Text] mark label.
User-added image

Flere ressurser
This example is for a stacked bar chart, but the display challenge can exist in other types of chart with mark labels. The example above shows splitting the texts at 15 characters, but you can set other values or conditions depending on the requirements.
Knowledge-artikkelnummer

001471712

Vedlegg

LongTextWrapBarChart.twbx

21 KB

 
Laster
Salesforce Help | Article