Mpandroidchart: BarChart in CombinedChart is clipping the outer bars

Created on 6 Dec 2016  路  2Comments  路  Source: PhilJay/MPAndroidChart

When using non-grouped BarData CombinedChart clips the outer most bars.

Here is a quick example I made by changing BarChartActivity in the Example project to use CombinedChart.

If you can point me in the right direction I'd be happy to help try and fix the problem.

combinedclipped

Most helpful comment

I was able to get around the above issue by using the following code:

XAxis xAxis = mChart.getXAxis();
xAxis.setAxisMinimum(data.getXMin() - .5f);
xAxis.setAxisMaximum(data.getXMax() + .5f);

This shouldn't be required so I am leaving the issue open so that it will hopefully be fixed.

All 2 comments

I was able to get around the above issue by using the following code:

XAxis xAxis = mChart.getXAxis();
xAxis.setAxisMinimum(data.getXMin() - .5f);
xAxis.setAxisMaximum(data.getXMax() + .5f);

This shouldn't be required so I am leaving the issue open so that it will hopefully be fixed.

@morriscodes Thanks, it worked for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

galex picture galex  路  3Comments

Nima9Faraji picture Nima9Faraji  路  3Comments

botondbutuza picture botondbutuza  路  3Comments

AiTheAnswer picture AiTheAnswer  路  3Comments

DarkHelmet67 picture DarkHelmet67  路  3Comments