Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 64f5ce6

Browse files
committed
add color property of the pop up label
1 parent 731a455 commit 64f5ce6

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Classes/BEMSimpleLineGraphView.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ IB_DESIGNABLE @interface BEMSimpleLineGraphView : UIView <UIGestureRecognizerDel
325325
/// Color of the pop up label's background displayed when the user touches the graph.
326326
@property (strong, nonatomic) UIColor *colorBackgroundPopUplabel;
327327

328+
/// Color of the pop up label's text displayed when the user touches the graph.
329+
@property (strong, nonatomic) UIColor *colorTextPopUpLabel;
330+
328331

329332
/// Position of the y-Axis in relation to the chart (Default: NO)
330333
@property (nonatomic) BOOL positionYAxisRight;

Classes/BEMSimpleLineGraphView.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ - (void)commonInit {
154154
_colorPoint = [UIColor colorWithWhite:1.0 alpha:0.7];
155155
_colorTouchInputLine = [UIColor grayColor];
156156
_colorBackgroundPopUplabel = [UIColor whiteColor];
157+
_colorTextPopUpLabel = [UIColor darkTextColor];
157158
_alphaTouchInputLine = 0.2;
158159
_widthTouchInputLine = 1.0;
159160
_colorBackgroundXaxis = nil;
@@ -375,6 +376,7 @@ - (void)layoutTouchReport {
375376
self.popUpLabel.text = mString;
376377
self.popUpLabel.textAlignment = 1;
377378
self.popUpLabel.numberOfLines = 1;
379+
self.popUpLabel.textColor = self.colorTextPopUpLabel;
378380
self.popUpLabel.font = self.labelFont;
379381
self.popUpLabel.backgroundColor = [UIColor clearColor];
380382
[self.popUpLabel sizeToFit];

0 commit comments

Comments
 (0)