2013-06-04 39 views
2

我將實時數據添加到XY繪圖。如何刪除圖形的點/標記或使其不可見?我無法在java文檔中找到相應的方法。AndroidPlot隱形標記

mSimpleXYPlot.getGraphWidget().setDrawMarkersEnabled(false); 

不適用於我。 謝謝

回答

2

有幾個不同的選項。

//Sets all grid lines to transparent 
mySimpleXYPlot.getGraphWidget().getGridLinePaint().setColor(Color.TRANSPARENT); 

//Sets only the domain lines to transparent 
mySimpleXYPlot.getGraphWidget().getGridDomainLinePaint().setColor(Color.TRANSPARENT); 

//Sets only the range lines to transparent 
mySimpleXYPlot.getGraphWidget().getGridRangeLinePaint().setColor(Color.TRANSPARENT); 

當然,您可以用這種方式將網格線設置爲任何顏色,而不僅僅是透明。

我希望這會有所幫助。

+0

截至2014年中這個方法不存在於android plot 0.6.1版本的jar中。參考下面的答案 –

3

以我情況下,第一方法doen't在庫中存在,並且所述第二和第三被改變這樣的:

getDomainGridLinePaint();

而不是

getGridDomainLinePaint();

但是,它的工作原理。在setcontentview之前和你的活動之前的addseries onCreae方法