Hello everyone,
My first question in the forum,
I have a simple plotly bar graph but the xticks labels are very wide and I would like them to be on multilined based on a set widht value, I have tried everything but nothing seems to work, tickwidth, ticklen…etc, anyone can help please here is my code
`fig = px.bar(df[df['RESPONSIBILITY'] == 'ENGG'].groupby('Problem Desc', as_index=False).agg({'Tot Val of Claim':'sum','Claim No': lambda x:x.nunique()}),
x='Problem Desc', y='Tot Val of Claim',
text = 'Claim No', title= 'The Sum of Claim Values and Count per Engineering Problem Description')
fig.update_traces(
textposition='outside',
texttemplate='%{y} <br>%{text} claims'
)
fig.update_layout(xaxis = dict(title = dict(text = 'Problem Description', font=dict(size = 18))),
#xaxis_tickangle=0,
xaxis_tickwidth = 10000,
yaxis = dict(title = dict(text = 'Amount (SR)', font=dict(size = 18))),
title = dict(font=dict(size=18, color="gray", weight='bold'), x = 0.5 , y = 0.98 , automargin=True),
height=600,
margin=dict(l=20, r=20, t=40, b=0, pad=4),
yaxis_range=[0, 4.2e5]
)
fig.show()`