title: Is it possible to limit or truncate the characters of the tick label in plotly?
body: <p>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.</p>
  <p>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?</p>
  <p>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.</p>
  <p><a href="https://i.stack.imgur.com/JFi3K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JFi3K.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/unH5A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/unH5A.png" alt="enter image description here" /></a></p>
  <p>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.</p>
  <pre><code>labels = [(i.name[:40] + '..') if len(i.name) &gt; 40 else i.name for i in data]
  </code></pre>
  <p><a href="https://i.stack.imgur.com/4J60W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4J60W.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/bVrGH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bVrGH.png" alt="enter image description here" /></a></p>