We are having issues calculating the tick values along the yaxis. Currently we are calculating the max value in our data array using the Math.max() and setting conditions based on the result, however due to the large differences in the data that we receive, this has become a very cumbersome task. I was wondering how plotly calculates when to add the next tick so that i could replicate it for our purposes. As you can see in the codepen here plotly adds an extra tick when the max value hits 24 but in the second example it only adds one when the max value is 114 but not 113. I would expect the first change but in the second case i would expect it to change at 109 or 110. We set our dtick value based on the result of the conditions we have in place but as i said this is not ideal or accurate.
Would appreciate any help with this.
Thank in advance.