May i know how to round up a NSNumber in object C ?
for(int i=6; i>=0; i--)
{
DayOfDrinks *drinksOnDay = [appDelegate.drinksOnDayArray objectAtIndex:i];
NSString * dayString= [NSDate stringForDisplayFromDateForChart:drinksOnDay.dateConsumed];
[dayArray addObject:dayString];//X label for graph the day of drink.
drinksOnDay.isDetailViewHydrated = NO;
[drinksOnDay hydrateDetailViewData];
NSNumber *sdNumber = drinksOnDay.standardDrinks;
[sdArray addObject: sdNumber];
}
inside this sdArray are all the numbers like this 2.1, 1.3, 4.7, 3.1, 4.8, 15.1, 7.2;
i need to plot a graph Y axis so i need a string of whatever is from the NSNumber to show
a NSString of this {@”0″, @”2″, @”4″, @”6″, @”8″, @”10″, @”12″,@”14″,@”16″}. as i need to start from zero, i need to determine which is the biggest number value. in this case it will be 15.1 to show 16 in the graph. instead of doing a static labeling, i will like to do a dynamic labeling.

what you have seen in the graph is static numbering not dynamic.
i’m sorry for missing out the important info.
thanks for all the comments
Your edit now makes a lot more sense. Here is an example of getting all even numbers from your 0 to your max value in your
NSArrayofNSNumbers (assuming all values are positive, could be changed to support negative values by finding minimum float value as well).