Set fixed width for labels on y-axis


Hi there,

How can I set a fixed width for labels on a y-axis so that I can position a view accurately over it? The issue I’m facing is that depending on the number of digits in the numbers, the end of the graph / y-axis is dynamically positioned. I need to keep this UIView positioned so that it’s left edge corresponds to the pixel value where the axis is.


Hi Carlin,
You can set the lenght of labels on axis using this Delegate method of Chart :
-(NSString *)sChart:(ShinobiChart *)chart longestLabelStringOnAxis:(SChartAxis *)axis
return@“put a string here, of length which are want to set for label”;

Hope, it will help you.


Did this trick for you ?


Yep! Works like a charm to stop this jumpy y-axis, thanks!