AndroidPlot隐形标记

时间:2013-06-04 13:46:55

标签: android marker points androidplot

我正在将实时数据添加到XY图中。如何删除图形的点/标记或使其不可见?我在java doc中找不到相应的方法。

mSimpleXYPlot.getGraphWidget().setDrawMarkersEnabled(false);

不适合我。 感谢

2 个答案:

答案 0 :(得分:3)

在我的情况下,第一种方法在库中不存在,第二种和第三种方法改变如下:

getDomainGridLinePaint();

而不是

getGridDomainLinePaint();

但是,它确实有效。在setcontentview之后和活动onCreae方法

中的addseries之前

答案 1 :(得分: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);

当然,您可以通过这种方式将网格线设置为任何颜色,而不仅仅是透明。

我希望这会有所帮助。