Karol Magier

Add prefix/suffix public property for y label values

... ... @@ -46,6 +46,12 @@ typedef NSString *(^PNYLabelFormatter)(CGFloat yLabelValue);
/** Formats the ylabel text. */
@property (copy) PNYLabelFormatter yLabelFormatter;
/** Prefix to y label values, none if unset. */
@property (nonatomic) NSString *yLabelPrefix;
/** Suffix to y label values, none if unset. */
@property (nonatomic) NSString *yLabelSuffix;
@property (nonatomic) CGFloat chartMargin;
/** Controls whether labels should be displayed. */
... ...
... ... @@ -119,7 +119,7 @@
label.font = _labelFont;
label.textColor = _labelTextColor;
[label setTextAlignment:NSTextAlignmentRight];
label.text = labelText;
label.text = [NSString stringWithFormat:@"%@%@%@", _yLabelPrefix, labelText, _yLabelSuffix];
[self addSubview:label];
[_yChartLabels addObject:label];
... ...