Published: 04 Dec 2020 Last Modified Date: 08 Jul 2022
Wrapping text label showed on stacked bar chart by [Format] > [Alignment] > [Wrap] > [On] menu may not working. *[Format] > [Alignment] menu eg:
Using string function(eg: LEFT() , MID()) to break the long label string into short sub-string by creating calculation fields and display sub-strings one by one vertically on the bar chart. ※About String Function https://help.tableau.com/current/pro/desktop/en-us/functions_functions_string.htm
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.
*Please find attached LongTextWrapBarChart.twbx for more details.
This example is for a stacked bar chart, but the issue exists in other types of chart in mark labels.
Thank you for providing your feedback on the effectiveness of the article.