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

Enhancement: We can now set the text color for the popup label #305

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Classes/BEMSimpleLineGraphView.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ IB_DESIGNABLE @interface BEMSimpleLineGraphView : UIView <UIGestureRecognizerDel
@property (strong, nonatomic) UIColor *colorBackgroundPopUplabel;


/// Color of the pop up label's background displayed when the user touches the graph.
@property (strong, nonatomic) UIColor *colorTextPopUplabel;


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

Expand Down
2 changes: 2 additions & 0 deletions Classes/BEMSimpleLineGraphView.m
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ - (void)commonInit {
_colorPoint = [UIColor colorWithWhite:1.0 alpha:0.7];
_colorTouchInputLine = [UIColor grayColor];
_colorBackgroundPopUplabel = [UIColor whiteColor];
_colorTextPopUplabel = [UIColor blackColor];
_alphaTouchInputLine = 0.2;
_widthTouchInputLine = 1.0;
_colorBackgroundXaxis = nil;
Expand Down Expand Up @@ -376,6 +377,7 @@ - (void)layoutTouchReport {
self.popUpLabel.textAlignment = 1;
self.popUpLabel.numberOfLines = 1;
self.popUpLabel.font = self.labelFont;
self.popUpLabel.textColor = self.colorTextPopUplabel;
self.popUpLabel.backgroundColor = [UIColor clearColor];
[self.popUpLabel sizeToFit];
self.popUpLabel.alpha = 0;
Expand Down