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.
Adding a unit to y axis labels in plotly.js
Asked Answered
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"
}
};
(This post does not seem to provide a quality answer to the question. Please either edit your answer, or just post it as a comment to the question). –
Annapolis
© 2022 - 2024 — McMap. All rights reserved.
tickmode
of the yaxis ? the ticktext property should exist according to: plot.ly/python/reference/#layout-yaxis-ticktext – Ursiticksuffix
– Vitale