Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! ✅Check out the new docs.

Odd Rotated Label Text in Bar Chart


I was once told I was the worst JavaScript programmer by a real JS programmer so expect dumb questions. As I’m a Fortran programmer by trade, I’ll accept this. :slight_smile:

Following the plotly.js example for a stacked bar chart, I managed to make one from a CSV file (using PapaParse…which I was told is good?). To wit:

All looks good except that weird rotated 2 in the second stack. Is this just a consequence of having the right font size + thickness of the bar? Or should I use a different setting. I’m using:

   var trace = {
      x: xvals,
      y: yvals,
      name: tracename,
      type: 'bar',
      text: yvals,
      textposition: 'auto',
      hoverinfo: 'none',

Is there any extra flag I can send to say “If you have to rotate a label, just ensmallen”?