Вопрос

I am adding real time data to an XY Plot. How can I remove the graph's dots/markers or make them invisible? I cannot find the according method in the java doc.

mSimpleXYPlot.getGraphWidget().setDrawMarkersEnabled(false);

is not working for me. Thanks

Это было полезно?

Решение 2

There are a few different options.

//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);

And of course you can set the grid lines to any color this way, not just transparent.

I hope this helps.

Другие советы

In my case the first method doen't exist in the libraries, and the second and the third are changed like this:

getDomainGridLinePaint();

and not

getGridDomainLinePaint();

But yes, it works. After setcontentview and before addseries in your activity onCreae method

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top