Reputation: 5173
In CombinedChart
by adding chart.setFitBars(true)
will make the first and last bars visible.
I need to do the same for combining LineChart with BarChart.
Now, first and last bars aren't visible completely.
I've tried
xAxis.setAxisMaximum(data.getXMax() + 1f);
to extend X-Axis
towards right side so that the last bar will get enough space. This did the trick.
But what should I do for left side bar?
setAxisMinimum
doesn't help.
After adding setAxisMaximum
:
EDIT
I've referred this but it gives the solution for only BarChart
.
Upvotes: 3
Views: 1854
Reputation: 5173
Got it.
xAxis.setAxisMinimum(-0.5f);
I guess, Edited X-Axis label will make it look good.
For editing labels in MPAndroidchart
refer this answer
Upvotes: 7