title: X Axis Labels not showing up, using MPAndroidChart
body: <p>I want to have x axis labels on my linechart (using <a href="https://github.com/PhilJay/MPAndroidChart" rel="nofollow noreferrer">MPAndroidChart</a>) but no matter what I do, I can't get them to display. I have a method called setupChart which handles everything for that chart and this is what it looks like:</p>
  
  <pre><code>private void setupChart(LineChart chart, LineData data, int color) {
  
      ((LineDataSet) data.getDataSetByIndex(0)).setCircleColorHole(Color.WHITE);
      ((LineDataSet) data.getDataSetByIndex(0)).setCircleColor(color);
      ((LineDataSet) data.getDataSetByIndex(0)).setColors(dataColors);
      data.getDataSetByIndex(0).setAxisDependency(YAxis.AxisDependency.LEFT);
      ((LineDataSet) data.getDataSetByIndex(0)).setDrawCircles(false);
  
      // no description text
      chart.getDescription().setEnabled(false);
  
      // mChart.setDrawHorizontalGrid(false);
      //
      // enable / disable grid background
      chart.setDrawGridBackground(false);
  
      // enable touch gestures
      chart.setTouchEnabled(true);
  
      // disable scaling and dragging
      chart.setDragEnabled(false);
      chart.setScaleEnabled(false);
      chart.setAutoScaleMinMaxEnabled(false);
      // if disabled, scaling can be done on x- and y-axis separately
      chart.setPinchZoom(false);
      chart.setBackgroundColor(Color.parseColor("#dddddd"));
  
      // set custom chart offsets (automatic offset calculation is hereby disabled)
      chart.setViewPortOffsets(10, 0, 10, 0);
      // add data
      chart.setData(data);
  
      // get the legend (only possible after setting data)
      Legend l = chart.getLegend();
      l.setEnabled(false);
  
      chart.getAxisLeft().setEnabled(false);
  
      chart.getAxisRight().setEnabled(false);
      chart.getXAxis().setPosition(XAxis.XAxisPosition.BOTTOM);
      chart.getXAxis().setEnabled(false);
      chart.getXAxis().setDrawLabels(true);
      chart.getXAxis().setTextColor(context.getResources().getColor(R.color.colorPrimary));
      chart.getXAxis().setTypeface(Typeface.SANS_SERIF);
      YAxis yAxis = chart.getAxisLeft();
      yAxis.setAxisMinimum(0f);
      yAxis.setAxisMaximum(100f);
  
      final String[] weeks = new String[52];
  
      for(int i = 0; i &lt; weeks.length; i++) weeks[i] = "Week " + (i+1);
  
      IAxisValueFormatter formatter = new IAxisValueFormatter() {
          @Override
          public String getFormattedValue(float value, AxisBase axis) {
              return weeks[(int) value];
          }
      };
  
      XAxis xAxis = chart.getXAxis();
      xAxis.setGranularity(1f);
      xAxis.setValueFormatter(formatter);
      // animate calls invalidate()...
      chart.animateXY(2000,2500);
  }
  </code></pre>
  
  <p>I am not sure what I am doing wrong. </p>