Text orentation on graphs

Hi all,

I have a stacked bar chart with text labels over the bars. I’ve noticed that the text changes from horizontal to vertical depending on the ratio of the height to width for a given stack. I was wondering if there was a way to fix the orientation so that the text is always horizontal? I’ve attached an image of the graph below!

Thanks!

Harry T

1 Like

Hey Henry,

Yup I’ve had this issue as well. Just add a textangle attribute to 0 (default is auto) in the layout portion of your figure.

Here is the reference page: https://plot.ly/python/reference/#bar-textangle

2 Likes

Hi There,

Thanks very much, adding in textangle = 0 to the trace seem to have done the trick!

Thanks again,

Harry T