Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
PNChart
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Karol Magier
2015-07-14 11:23:19 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa4192a8e901b4b44822b6482c6c08c72d919b54
fa4192a8
1 parent
f4c5f550
Add prefix/suffix public property for y label values
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
PNChart/PNBarChart.h
PNChart/PNBarChart.m
PNChart/PNBarChart.h
View file @
fa4192a
...
...
@@ -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. */
...
...
PNChart/PNBarChart.m
View file @
fa4192a
...
...
@@ -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
];
...
...
Please
register
or
login
to post a comment