MPANDROIDCHART: How to draw X label with .setViewPortOffsets(0,0,0,0)

假如想象 提交于 2019-12-11 09:23:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!