Package 

Class SimpleXYSeries

  • All Implemented Interfaces:
    com.androidplot.PlotListener , com.androidplot.Series , com.androidplot.xy.EditableXYSeries , com.androidplot.xy.OrderedXYSeries , com.androidplot.xy.XYSeries

    
    public class SimpleXYSeries
     implements EditableXYSeries, OrderedXYSeries, PlotListener
                        

    A convenience class used to create instances of XYPlot generated from Lists of Numbers.

    • Method Detail

      • setXOrder

         void setXOrder(OrderedXYSeries.XOrder xOrder)

        If XVals are in strict ascending order, use this method to set ASCENDING to provide an optimizationhint to the renderer.

      • onBeforeDraw

         void onBeforeDraw(Plot source, Canvas canvas)

        Fired immediately before the Plot "source" is drawn onto canvas.Commonly used by implementing Series instances to activate a readlock on it's self in preparation for the Plot's imminent readingof that series.

      • onAfterDraw

         void onAfterDraw(Plot source, Canvas canvas)

        Fired immediately after the Plot "source" is drawn onto canvas.Just as onBeforeDraw(...) is commonly used by Series implementationsto activate a read lock, this method is commonly used to release thatsame lock.

      • useImplicitXVals

         void useImplicitXVals()

        Use index value as xVal, instead of explicit, user provided xVals.

      • setModel

         void setModel(List<out Number> model, SimpleXYSeries.ArrayFormat format)

        Use the provided list of Numbers as yVals and their corresponding indexes as xVals.

        Parameters:
        model - A List of Number elements comprising the data model.
        format - Format of the model.
      • setX

         void setX(Number value, int index)

        Sets individual x value based on index

      • setY

         void setY(Number value, int index)

        Sets individual y value based on index

      • resize

         void resize(int size)

        Resize to accommodate the specified number of x/y pairs. If elements must be droped, thoseat the highest iVal should be removed first.

      • setXY

         void setXY(Number xVal, Number yVal, int index)

        Sets xy values based on index

      • getX

         Number getX(int index)

        Returns the x-value for an index within a series.

        Parameters:
        index - the index index (in the range 0 tosize()-1).
      • getY

         Number getY(int index)

        Returns the y-value for an index within a series.

        Parameters:
        index - the index index (in the range 0 tosize()-1).
      • clear

         void clear()

        Remove all values from the series