Androidplot - getSeriesSet() and other methods in newer AndroidPlot versions

75 Views Asked by At

I'm looking at this answer from another question and trying to test it out.

One problem I'm having is a couple of the methods seem to have changed in newer versions of Androidplot. For whatever reason I can't figure out what replacement methods I'm meant to use.

The methods in question are:

  • mPlot.getSeriesSet().iterator().next() //Cannot resolve getSeriesSet
  • ValPixConverter.valToPix //Cannot resolve ValPixConverter
  • widget.getXVal //Cannot resolve .getXVal

My ultimate goal is to be able to place markers on the graph traces

EDIT:

Ok I've figured getXVal/getYVal gets replaced with screenToSeriesX/screenToSeriesY, the rest are still unknown :(

1

There are 1 best solutions below

0
Jameson On BEST ANSWER

I eventually figured it out :)

mPlot.getSeriesSet().iterator().next() gets replaced with plot2.getRegistry().getSeriesList().iterator().next()

getXVal & getYVal gets replaced with screenToSeriesX & screenToSeriesY

For ValPixConverter I just copied the class from an older version of Androidplot.

This was enough to get me playing around with placing markers/cursor on the graph but a better solution will be formulated for the future.