大家好:我目前正在将GraphView库集成到我的安卓项目中。我在想,网格的大小是否可以调整。另外,标签的大小可以改变吗?这些数字真的很小,很难读懂。提前谢谢你!
发布于 2013-01-15 15:27:32
您需要修改源代码。从github克隆它,并将其用作Android库。
代码真的很容易理解。例如,要更改标签大小/颜色/更多,只需在此处进行修改:https://github.com/jjoe64/GraphView/blob/master/src/com/jjoe64/graphview/GraphView.java#L213
祝好运
发布于 2016-02-18 14:38:14
您可以使用以下代码更改标签大小
//setting the minimum and maximum values for x and y axis
graph.getViewport().setXAxisBoundsManual(true);
graph.getViewport().setMinX(0);
graph.getViewport().setMaxX(12);
graph.getViewport().setYAxisBoundsManual(true);
graph.getViewport().setMinY(0);
graph.getViewport().setMaxY(6);
//number of labels on x nd y axis
graph.getGridLabelRenderer().setNumHorizontalLabels(7);
graph.getGridLabelRenderer().setNumVerticalLabels(7);https://stackoverflow.com/questions/14114181
复制相似问题