Closed EpicDraws closed 8 years ago
When maxValue
is a property, its getter should returns user defined value or max value of _values
.
So, how about defining like this?
- (NSNumber *)getMaxValue {
return _maxValue ? _maxValue : [NSNumber numberWithFloat:[[_values valueForKeyPath:@"@max.floatValue"] floatValue]];
}
Please oh please don't make a getXXX
property. This isn't java
;) the getter should be (NSNumber *)maxValue
— or did I misunderstand something?
Agreed, and submitted a change with nonnull, nonatomic as well as the getter method using -maxValue.
On Fri, Jan 29, 2016 at 1:08 AM StuFF mc notifications@github.com wrote:
Please oh please don't make a getXXX property. This isn't java ;) the getter should be (NSNumber *)maxValue — or did I misunderstand something?
— Reply to this email directly or view it on GitHub https://github.com/yasuoza/YOChartImageKit/pull/3#issuecomment-176653324 .
@stuffmc Thank you for your whole contribution! Yes, I agree with you.
@EpicDraws Thank you very much! I'll merge this!
I will release new version in this weekend. Thank you guys!
Setting maxValue overrides default behavior of using the highest value as the max y value for the charts.