title: Force BarChart Y axis labels to be integers?
body: <p>I've created a BarChart using MPAndroidChart and I'm entering the data dynamically. This means that I need my Y axis to also be determined dynamically. All of my data is represented as integers, however the Y axis is sometimes displaying the legend as decimal values with 1 decimal point.</p>
  
  <p>I've attempted to use a ValueFormatter to round the values, but the problem is that sometimes the Y values aren't at integer value locations (ex. 0.8,1.6,2.4,etc). Therefore, if I just edit these to be integers they won't be in the right location.</p>
  
  <p>Is there anyway that I can force the BarChart to only display values at Integer locations? Its ok if it skips some, in fact I want it to when the values get large.</p>
  
  <p>Edit: When I said that the integers aren't in the right locations, I meant that once I modify what each label displays they aren't 'correct'. In my example I have 5 bars displaying the values 3,4,2,3,2. The first image is the 'default', the second is the image once I've edited the value formatter using: </p>
  
  <pre><code>myBarChart.getYLabels().setFormatter(new ValueFormatter()
  {
      @Override
      public String getFormattedValue(float v)
      {
          return ((int) v)+"";
      }
  });
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/hVFTf.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/M2i6K.png" alt="enter image description here"></p>
  
  <p>As we can see from these images, my integer values are not where they should be (and there are two '2s'). In this example I'd except it to display the values 0,1,2,3,4. If I have a lot more data I'm hoping it would be smart enough to only show what values I have room for, so for examples if the data contains values of 0-50 it would show something like 0,10,20,30,40,50 or possibly 0,15,30,45, etc.</p>