2

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

RootRaven
  • 395
  • 5
  • 14

2 Answers2

3

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

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.

buczek
  • 2,011
  • 7
  • 29
  • 40