问题
I have a problem with draw X label when my chart has been set setViewPortOffsets on 0, 0, 0, 0. I know what setViewPortOffsets do, But I don't know how to set it to make only the margins disappear on left and right side. Can someone help me please?
PS: Sorry for my bad English.
回答1:
Add following lines to remove axis lines from both sides of chart:
chartView.getAxisLeft().setEnabled(false);
chartView.getAxisRight().setEnabled(false);
来源:https://stackoverflow.com/questions/47780961/mpandroidchart-how-to-draw-x-label-with-setviewportoffsets0-0-0-0