I'm trying to figure out how to get a set width for the x-axis labels on the XY Chart. I have a 3-chart view that is made using embedded views, and two of the three are smaller, causing the words to sit on top of each other. I can't make the font size smaller or you wouldn't be able to read it. I know you can make the width of the column restricted to a certain width, but can you do the same to the labels and have them just line down to finish if it's too wide for that space?
Try this:
Add in the renderer
section.
The charts are based on AM Charts. You can read more about rendering at https://www.amcharts.com/docs/v4/tutorials/wrapping-and-truncating-axis-labels/.
That's perfect. Thank you!
Now the only thing I'm curious on is centering the wrapped text. I can see on that page that you can manipulate where the label comes up in correlation to the bar, but not necessarily if it is centered for the actual text. Any suggestions?
Try adding,
textAlign : start | middle | end
1 Like
Beautiful. Love it. Thank you