5

I'd like to add a unit to the y-axis tick labels in plotly.js. How might I do this? Adding a ticktext and tickval property for yaxis layout doesn't seem to have the effect I thought, as it does with an xaxis.

Amy
  • 51
  • 1
  • 4

1 Answers1

11

As per your own comment, and per here

ticksuffix(string)

You can add this as part of the x or y axis option as part of the layout text for your plot.

e.g.

var layout = {
    yaxis:
    {
        ticksuffix: "suffix"
    }
};
JosephWR
  • 211
  • 3
  • 4
  • (This post does not seem to provide a [quality answer](https://stackoverflow.com/help/how-to-answer) to the question. Please either edit your answer, or just post it as a comment to the question). – sɐunıɔןɐqɐp Jul 29 '18 at 16:30