MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
10/03/14 05:23 AM (9 years ago)

Pie Chart Values

Hey, using the pie chart plugin. How can I get a rounded number to show up? I input 33, and it shows up as 33.00 Thanks Miguel
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/03/14 06:16 AM (9 years ago)
somewhere in the code there will be a number formatter you can set decimal points in there. I don't have this plugin so have a dig
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/03/14 06:18 AM (9 years ago)
I have this....but change it to what? NSNumberFormatter *doubleValueWithMaxTwoDecimalPlaces = [[NSNumberFormatter alloc] init]; [doubleValueWithMaxTwoDecimalPlaces setNumberStyle:NSNumberFormatterDecimalStyle]; [doubleValueWithMaxTwoDecimalPlaces setMaximumFractionDigits:2]; NSNumber *myValue = [NSNumber numberWithFloat:sectionValue]; doubleValueWithMaxTwoDecimalPlaces = nil;
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/03/14 06:22 AM (9 years ago)
[doubleValueWithMaxTwoDecimalPlaces setMaximumFractionDigits:2]; change it to 0 maximum number of decimal points [doubleValueWithMaxTwoDecimalPlaces setMaximumFractionDigits:0];
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/03/14 06:31 AM (9 years ago)
hummmm..... must be somewhere else as well..... checking.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/03/14 06:32 AM (9 years ago)
Should i be able to change this into something else: doubleValueWithMaxTwoDecimalPlaces
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/03/14 06:37 AM (9 years ago)
Find where the labels are printed
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/03/14 06:46 AM (9 years ago)
hummmmm
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
10/05/14 08:14 AM (9 years ago)
haven't found it...
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.