title: How to set X axis labels in MP Android Chart (Bar Graph)?
body: <p>This is with reference to the article : <a href="https://github.com/PhilJay/MPAndroidChart/wiki/Setting-Data" rel="noreferrer">https://github.com/PhilJay/MPAndroidChart/wiki/Setting-Data</a>  under the heading <strong>Bar Graph</strong>.In the given code below:</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
      View view = inflater.inflate(R.layout.fragment_graph_test, container, false);
  
      BarChart chart = view.findViewById(R.id.bar_Chart_test);
  
      List&lt;BarEntry&gt; entries = new ArrayList&lt;&gt;();
      entries.add(new BarEntry(0f, 30f));
      entries.add(new BarEntry(1f, 80f));
      entries.add(new BarEntry(2f, 60f));
      entries.add(new BarEntry(3f, 50f));
      // gap of 2f
      entries.add(new BarEntry(5f, 70f));
      entries.add(new BarEntry(6f, 60f));
  
      BarDataSet set = new BarDataSet(entries, "BarDataSet");
      BarData data = new BarData(set);
      data.setBarWidth(0.9f); // set custom bar width
      chart.setData(data);
      chart.setFitBars(true); // make the x-axis fit exactly all bars
      chart.invalidate(); // refresh
  
      return view;
  }
  </code></pre>
  
  <p>the output was:</p>
  
  <p>Here the X values are not displayed.<a href="https://i.stack.imgur.com/KXwmq.png" rel="noreferrer">Click here for the ScreenShot</a></p>
  
  <p>how to set the X-axis values as months(1st Jan,2nd Jan,3rd Jan.....) as displayed in the article.</p>