MPAndroidChart : Only alternate labels are shown in x axis when more entries comes
<p>In my android application i have a horizontal bar chart using MPAndroidChart.My problem is there are 12 number of bars in my bar chart each represents month from April to March,but i can see only alternate months label in x-axis.If there are small number of bars then i can see all the labels in x-axis.I didn't set any label count for x-axis using</p>

<p>xAxix.setLabelCount()</p>

<p>method.Then why i can't see all the labels? If I zoomed then i can see labels for each bar.I am using MPAndroidChart v3.0.1.Attached is the screenshot of the above.See here I can see only 'Apr,Jun,Aug,Oct,Dec,Feb' and all the other months are not displayed.How can I see all the other months also.</p>

<p><a href="https://i.stack.imgur.com/lRr2R.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/lRr2R.jpg" alt="Horizontal BarChart"></a></p>

<p>Below is my code.</p>

<pre><code>        yVals1 = new ArrayList&lt;BarEntry&gt;();
    xVals = new ArrayList&lt;String&gt;();
    for (int i = 0; i &lt; listChart.size(); i++){
        BarEntry newBEntry = new BarEntry(i,listChart.get(i).getAmount());
        xVals.add(listChart.get(i).getAltName());
        yVals1.add(newBEntry);
    }

    BarDataSet set1;
    set1 = new BarDataSet(yVals1, "");
    set1.setColors(new int[] {Color.BLUE,Color.GREEN});
    ArrayList&lt;IBarDataSet&gt; dataSets = new ArrayList&lt;IBarDataSet&gt;();
    dataSets.add(set1);
    BarData data = new BarData(dataSets);
    data.setValueTextSize(10f);
    barChartIncExp.setData(data);

    barChartIncExp.setDrawBarShadow(false);
    barChartIncExp.setDrawValueAboveBar(true);

    barChartIncExp.getDescription().setEnabled(false);
    barChartIncExp.setMaxVisibleValueCount(60);
    // scaling can now only be done on x- and y-axis separately
    barChartIncExp.setPinchZoom(true);
    barChartIncExp.setDrawGridBackground(false);
    barChartIncExp.setHighlightFullBarEnabled(false);
    barChartIncExp.setHighlightPerDragEnabled(false);

    XAxis xAxis = barChartIncExp.getXAxis();
    xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
    xAxis.setDrawGridLines(false);
    xAxis.setGranularity(1f); 
    xAxis.setValueFormatter(new IAxisValueFormatter() {
        @Override
        public String getFormattedValue(float value, AxisBase axis) {
            if(Math.round(value) &gt;= xVals.size()) {
                return null;
            } else {
                return xVals.get(Math.round(value));
            }
        }
    });


    YAxis leftAxis = barChartIncExp.getAxisLeft();
    leftAxis.setDrawGridLines(false);
    leftAxis.setLabelCount(8, false);
    leftAxis.setSpaceTop(15f);
    leftAxis.setDrawLabels(false);

    YAxis rightAxis = barChartIncExp.getAxisRight();
    rightAxis.setLabelCount(8, false);
    rightAxis.setPosition(YAxis.YAxisLabelPosition.OUTSIDE_CHART);

    Legend l = barChartIncExp.getLegend();
    l.setEnabled(false);

    barChartIncExp.setOnChartValueSelectedListener(new OnChartValueSelectedListener() {
        @Override
        public void onValueSelected(Entry entry, Highlight highlight) {

        }

        @Override
        public void onNothingSelected() {

        }
    });
</code></pre>