MPANDROIDCHART: How to draw X label with .setViewP

2019-08-08 14:51发布

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条回答
可以哭但决不认输i
2楼-- · 2019-08-08 15:23

Add following lines to remove axis lines from both sides of chart:

chartView.getAxisLeft().setEnabled(false);
chartView.getAxisRight().setEnabled(false);
查看更多
登录 后发表回答