java - MPAndroidChart X axis labels not aligned with bar graph -
i'm creating combined chart line chart , group bar chart using mpandroidchart v3.0.2 found labels on x-axis not aligned bar in group bar chart.
below screenshot same.
code using plotting graph.
xvals = new arraylist(); xvals.add("january"); xvals.add("february"); xvals.add("march"); xvals.add("april"); xvals.add("may"); xvals.add("june"); xvals.add("july"); xvals.add("august"); xvals.add("september"); xvals.add("october"); xaxis xaxis = mchart.getxaxis(); xaxis.setposition(xaxis.xaxisposition.bottom); xaxis.setaxisminimum(0); xaxis.setaxismaximum(mchart.getbardata().getgroupwidth(groupspace, barspace) * xvals.size()); xaxis.setgranularityenabled(false); xaxis.setcenteraxislabels(true); xaxis.setdrawgridlines(false); xaxis.settextsize(8); xaxis.setlabelcount(xvals.size()); xaxis.setvalueformatter(new indexaxisvalueformatter(xvals));
Comments
Post a Comment