We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
barDataSet = new BarDataSet(barEntries, ""); barData = new BarData(barDataSet); barData.setBarWidth(.5f); barChart.setData(barData); barDataSet.setColors(getResources().getColor(R.color.colorPrimary)); barDataSet.setValueTextColor(Color.BLACK); barDataSet.setDrawValues(false); barChart.getXAxis().setDrawAxisLine(false); barChart.setDrawGridBackground(false); barChart.getXAxis().setDrawGridLines(false); barChart.getAxisLeft().setDrawGridLines(false); barChart.getAxisRight().setDrawGridLines(false); barChart.getAxisLeft().setEnabled(false); barChart.getAxisRight().setEnabled(false); barChart.getLegend().setEnabled(false); barChart.setPinchZoom(false); barChart.setDescription(null); barChart.setTouchEnabled(false); barChart.setDoubleTapToZoomEnabled(false); barChart.setExtraOffsets(20, 0, 0, 30); XAxis xAxis = barChart.getXAxis(); xAxis.setPosition(XAxis.XAxisPosition.BOTTOM); xAxis.setTextSize(14f); xAxis.setTextColor(Color.BLACK); // Set the value formatter xAxis.setYOffset(5); xAxis.setDrawLabels(true); xAxis.setGranularityEnabled(true); xAxis.setGranularity(1f); xAxis.setXOffset(30); xAxis.setValueFormatter(new IndexAxisValueFormatter(xAxisLabel)); xAxis.setCenterAxisLabels(true); barChart.invalidate();
I wanted to get the labels in centre like this
I only see solutions to centre labels in grouped bar charts or combined charts.
The text was updated successfully, but these errors were encountered:
I'm facing the same issue. In grouped bar chart the first bar is leaving some space at beginning. Any solution?
Sorry, something went wrong.
No branches or pull requests
What I did?
What I expected to happen?
I wanted to get the labels in centre like this
![image](https://user-images.githubusercontent.com/11012981/84578115-edf83380-addf-11ea-9a7b-468bd1d59432.png)
What happened instead?
I only see solutions to centre labels in grouped bar charts or combined charts.
The text was updated successfully, but these errors were encountered: