-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add “%” to data in ios-chart #1797
Comments
OuSS-90
changed the title
Legend text not displayed in iOS-Chart
Legend text not displayed
Nov 6, 2016
use PieChartData *data = [[PieChartData alloc] initWithDataSet:dataSet];
NSNumberFormatter *pFormatter = [[NSNumberFormatter alloc] init];
pFormatter.numberStyle = NSNumberFormatterPercentStyle;
pFormatter.maximumFractionDigits = 1;
pFormatter.multiplier = @1.f;
pFormatter.percentSymbol = @" %";
[data setValueFormatter:[[ChartDefaultValueFormatter alloc] initWithFormatter:pFormatter]];
[data setValueFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:11.f]];
[data setValueTextColor:UIColor.whiteColor]; |
Thanks it work now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to add "%" in PieChart data ? NSNumberFormatter() is no longer available
The text was updated successfully, but these errors were encountered: