klauslanza

Added format block in previous method.

@@ -821,8 +821,14 @@ @@ -821,8 +821,14 @@
821 } 821 }
822 } 822 }
823 823
824 -  
825 - (NSString*) formatYLabel:(double)value{ 824 - (NSString*) formatYLabel:(double)value{
  825 +
  826 + if (self.yLabelBlockFormatter)
  827 + {
  828 + return self.yLabelBlockFormatter(value);
  829 + }
  830 + else
  831 + {
826 if (!self.thousandsSeparator) { 832 if (!self.thousandsSeparator) {
827 NSString *format = self.yLabelFormat ? : @"%1.f"; 833 NSString *format = self.yLabelFormat ? : @"%1.f";
828 return [NSString stringWithFormat:format,value]; 834 return [NSString stringWithFormat:format,value];
@@ -832,9 +838,9 @@ @@ -832,9 +838,9 @@
832 [numberFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4]; 838 [numberFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4];
833 [numberFormatter setNumberStyle: NSNumberFormatterDecimalStyle]; 839 [numberFormatter setNumberStyle: NSNumberFormatterDecimalStyle];
834 return [numberFormatter stringFromNumber: [NSNumber numberWithDouble:value]]; 840 return [numberFormatter stringFromNumber: [NSNumber numberWithDouble:value]];
  841 + }
835 } 842 }
836 843
837 -  
838 - (UIView*) getLegendWithMaxWidth:(CGFloat)mWidth{ 844 - (UIView*) getLegendWithMaxWidth:(CGFloat)mWidth{
839 if ([self.chartData count] < 1) { 845 if ([self.chartData count] < 1) {
840 return nil; 846 return nil;