You must be logged in to post your query.
Home › Forums › Chart Support › alignment of multiline label
Tagged: mulit-line label alignment
I have created a horizontal bar chart with some multiline labels and I cannot get to align the mulit-line labels nicely.
My “X” axis is on the left and my problems are:
– labelTextAlign: “left” is ignored on the X axis
– vertical alignment of multiline labels is not centered (the label starts in the center, but is not aligned on the center)
My problem is with the 1st and the 3rd label in the following example.
Increasing the maximum label width is not an option as I will have several charts side by side.
Can somebody help my to understand what I did wrong ?
Setting labelTextAlign property allows you to align the text within particular label to left / center / right according to the line that has maximum width out of all the lines that are wrapped. In your example, label ‘Function Management’ and ‘Accounts Receivables’ is getting wrapped once its width crosses labelMaxWidth. Please take a look at this updated JSFiddle which highlights the region according to which axis labels are aligned to make it more clear about this use-case.
Thank you for the explanation
I was looking for a way to align all the labels, not to align the text “within” a label. But I understand that there is not setting for that.
Sorry, it’s not possible to align all axis labels to the left extreme of the chart as of now.
You must be logged in to reply to this topic. Login/Register