title: How to add % to Y axis values/labels in ios Charts?
body: <p>I'm using IOS Charts, to plot horizontal bar chart, with 2 y-values.I have a requirement of adding '%' symbol to both y-values showing beside the bars, and even on Y-Axis(RightAxis) How to do that ? Here is my graph image[Horizontal Bar chart that I drew][1]And I'm drawing this plot using objective-C but using Swift framework. Here is the link for the charts I'm using <a href="https://github.com/danielgindi/Charts" rel="nofollow">https://github.com/danielgindi/Charts</a></p>
  
  <p>I added this bottom lines to my code as advised by creativ</p>
  
  <pre><code>NSNumberFormatter *formater = [[NSNumberFormatter alloc] init];
  formater.numberStyle = NSNumberFormatterPercentStyle;
  
  _graphContainerView.rightAxis.valueFormatter = formater;
  </code></pre>
  
  <p>But the problem is I'm getting values beside each bar as decimal points as shown in below Image but I want them also in percentage values here is my code</p>
  
  <p>-(void)setDataForXAxis:(NSMutableArray*)xVals benchMarkValues:(NSMutableArray*)benchMarkVals percentageValues:(NSMutableArray*)percentVals <a href="http://i.stack.imgur.com/vu1U1.png" rel="nofollow">This image is after adding the below code</a>{</p>
  
  <pre><code>NSMutableArray *yVals1 = [[NSMutableArray alloc] init];
  NSMutableArray *yVals2 = [[NSMutableArray alloc] init];
  
  for (int i = 0; i &lt; xVals.count; i++)
  {
      NSNumber *val = [benchMarkVals objectAtIndex:i];
      [yVals1 addObject:[[BarChartDataEntry alloc] initWithValue:val.doubleValue/100 xIndex:i]];
  
      val = [percentVals objectAtIndex:i];
      [yVals2 addObject:[[BarChartDataEntry alloc] initWithValue:val.doubleValue/100 xIndex:i]];
  }
  
  BarChartDataSet *set1 = [[BarChartDataSet alloc] initWithYVals:yVals1 label:@"Sectoral \nBreakdown(Benchmark)"];
  [set1 setColor:[UIColor colorWithRed:236/255.f green:205/255.f blue:118/255.f  alpha:1.f]];
  BarChartDataSet *set2 = [[BarChartDataSet alloc] initWithYVals:yVals2 label:@"Sectoral \nBreakdown(%)"];
  [set2 setColor:[UIColor colorWithRed:31/255.f green:125/255.f blue:184/255.f alpha:1.f]];
  set2.barSpace = set1.barSpace = 0;
  
  NSMutableArray *dataSets = [[NSMutableArray alloc] init];
  [dataSets addObject:set1];
  [dataSets addObject:set2];
  
  BarChartData *data = [[BarChartData alloc] initWithXVals:xVals dataSets:dataSets];
  data.groupSpace = 1.1;
  [data setValueFont:[UIFont fontWithName:kUTLightFontName size:6.f]];
  _graphContainerView.data = data;
  </code></pre>
  
  <p>}</p>