GraphViewData[] data = new GraphViewData[numElements];
for (int c = 0; c<numElements; c++) {
data[c] = new GraphViewData(c+1, pvalueArray[c]);
}
GraphView graphView = new LineGraphView(this, Captionname);
GraphViewSeries graphViewSeries = new GraphViewSeries(data);
我正在像上面那樣填充圖形,我的數組包含的值設置爲2位小數。Eclipse中GraphView上的Y軸可以設置爲2位小數
當我在我的應用程序中使用圖形時,Y軸上升到小數點後3位。我可以強迫它成爲2嗎?
我使用的是3.1.3版本。我真的不想升級並且不得不更改大量代碼。
如何使用DefaultLabelFormatter? - 對不起,我不能添加評論,因爲我是新的!
你用'DefaultLabelFormatter(xAxisNumberFormatter,yAxisNumberFormatter)'試過了嗎? –
GraphView 3.x的示例仍可在https://github.com/jjoe64/GraphView-Demos/tree/3.x – appsthatmatter