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

Feature Enhancement: add color property of the pop up label #283

Open
wants to merge 1 commit 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
3 changes: 3 additions & 0 deletions Classes/BEMSimpleLineGraphView.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ IB_DESIGNABLE @interface BEMSimpleLineGraphView : UIView <UIGestureRecognizerDel
/// Color of the pop up label's background displayed when the user touches the graph.
@property (strong, nonatomic) UIColor *colorBackgroundPopUplabel;

/// Color of the pop up label's text 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 darkTextColor];
_alphaTouchInputLine = 0.2;
_widthTouchInputLine = 1.0;
_colorBackgroundXaxis = nil;
Expand Down Expand Up @@ -375,6 +376,7 @@ - (void)layoutTouchReport {
self.popUpLabel.text = mString;
self.popUpLabel.textAlignment = 1;
self.popUpLabel.numberOfLines = 1;
self.popUpLabel.textColor = self.colorTextPopUpLabel;
self.popUpLabel.font = self.labelFont;
self.popUpLabel.backgroundColor = [UIColor clearColor];
[self.popUpLabel sizeToFit];
Expand Down