Mpandroidchart: Chart cannot be inset to add left and right spacing [Screenshot attached].

Created on 11 May 2017  路  1Comment  路  Source: PhilJay/MPAndroidChart

I'm unable to inset the graph using the setViewPortOffsets or setExtraOffsets or restrainViewPort or by using the ViewPortHandler.

See the "Default" look in the image I drew below vs. what I want it to look like where the first and last data points are inset a bit instead of right on the edge. If this isn't possible right now, could it be added to the library?

charts

This may be related to another issue that was just filed here: https://github.com/PhilJay/MPAndroidChart/issues/3104.

Most helpful comment

maybe

chart.getXAxis().setAxisMaximum(chart.getLineData().getXMax() + 0.5f);
chart.getXAxis().setAxisMinimum(chart.getLineData().getXMin() - 0.5f);

>All comments

maybe

chart.getXAxis().setAxisMaximum(chart.getLineData().getXMax() + 0.5f);
chart.getXAxis().setAxisMinimum(chart.getLineData().getXMin() - 0.5f);
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Giammaofwar picture Giammaofwar  路  3Comments

mrZizik picture mrZizik  路  3Comments

JungYongWook picture JungYongWook  路  3Comments

rohitkumarbhagat picture rohitkumarbhagat  路  3Comments

blotfi picture blotfi  路  3Comments