michalkonturek/GraphKit — pull request #13 by hons82 (2014-08-28 15:29:15+00:00)
Title: GKLineGraph - TitleLabels dynamic width

That's really a great library, that's why I'm using it in [my APP]( https://itunes.apple.com/it/app/bletimetracker/id902295272?l=en&mt=8).

However, the reason why I forked it was that I had to put real dates (e.g. 29/08/14) as title label which is wider than the Label width, which results in being cropped (e.g. 29/08/...)

1) I was able to change your code to calculate the width dynamically, so now It's showing all.
2) If the values of the points was really really low it could happen that by "ceil"ing the value you got just a "0" on the Y-Axis or worse 2 "0" (which should probably be something like 0.1 and 0.3 that was converted into "0" and "0" with the "ceil" command. I found a solution to work there with fractions and give them a reasonable length. However it might not always be what the user expects, so you could probably add a setting e.g."isYLableFraction" and show it fractionated only if its really set by the user.
3) If all values in the array are the same("e.g all "0"s or all "1"s) then your not able to calculate the position of the line and it will crash. this can be avoided with my implementation of ```- (CGFloat)_maxValue```. Again it might not be the best solution to simply add 1 if all values are equal but... it works :-D