I have run into a tick label length problem with plotly. I have scoured the literature and plotly documents but cannot find anything specifically related to tick label length. I have tried to update axis 'tickwidth' and 'ticklen' to no avail. I have found hoverlabel namelength but no tick label name length.
If a tick label is very long it will squash my graphs up. I cannot control the length unless I reduce the database length of the String as it relies on user input. But I need the full length for other uses. Is there a way to truncate or limit the length of the tick label somehow?
I also have the same problem with the legend reducing the size of the pie chart. I have used hoverlabel_namelength to limit the character in the hover label box of the bar chart, but can't find how to do this for the pie chart hover label box or either the pie legend box and also for the bar graph tick labels? Any ideas? I am using python but javascript options I can try and work with too.
EDIT-- There doesn't seem to be a plotly solution but @Thomas did suggest to just loop through the label data (this was a brain fart on my end as I was imagining the thousands of entries going in that needed truncating and not the smaller grouped output of the sql query that needed truncating) so I have done so here.
labels = [(i.name[:40] + '..') if len(i.name) > 40 else i.name for i in data]