com.jjoe64.graphview
Class GraphViewSeries

java.lang.Object
  extended by com.jjoe64.graphview.GraphViewSeries

public class GraphViewSeries
extends java.lang.Object

a graphview series. holds the data, description and styles


Nested Class Summary
static class GraphViewSeries.GraphViewSeriesStyle
          graph series style: color and thickness
 
Constructor Summary
GraphViewSeries(GraphViewDataInterface[] values)
           
GraphViewSeries(java.lang.String description, GraphViewSeries.GraphViewSeriesStyle style, GraphViewDataInterface[] values)
           
 
Method Summary
 void addGraphView(GraphView graphView)
          this graphview will be redrawn if data changes
 void appendData(GraphViewDataInterface value, boolean scrollToEnd)
          Deprecated. please use appendData(GraphViewDataInterface, boolean, int) to avoid memory overflow
 void appendData(GraphViewDataInterface value, boolean scrollToEnd, int maxDataCount)
          add one data to current data
 GraphViewSeries.GraphViewSeriesStyle getStyle()
           
 void removeGraphView(GraphView graphView)
          you should use GraphView.removeSeries(GraphViewSeries)
 void resetData(GraphViewDataInterface[] values)
          clears the current data and set the new.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphViewSeries

public GraphViewSeries(GraphViewDataInterface[] values)

GraphViewSeries

public GraphViewSeries(java.lang.String description,
                       GraphViewSeries.GraphViewSeriesStyle style,
                       GraphViewDataInterface[] values)
Method Detail

addGraphView

public void addGraphView(GraphView graphView)
this graphview will be redrawn if data changes

Parameters:
graphView -

appendData

@Deprecated
public void appendData(GraphViewDataInterface value,
                                  boolean scrollToEnd)
Deprecated. please use appendData(GraphViewDataInterface, boolean, int) to avoid memory overflow

add one data to current data

Parameters:
value - the new data to append
scrollToEnd - true => graphview will scroll to the end (maxX)

appendData

public void appendData(GraphViewDataInterface value,
                       boolean scrollToEnd,
                       int maxDataCount)
add one data to current data

Parameters:
value - the new data to append
scrollToEnd - true => graphview will scroll to the end (maxX)
maxDataCount - if max data count is reached, the oldest data value will be lost

getStyle

public GraphViewSeries.GraphViewSeriesStyle getStyle()
Returns:
series styles. never null

removeGraphView

public void removeGraphView(GraphView graphView)
you should use GraphView.removeSeries(GraphViewSeries)

Parameters:
graphView -

resetData

public void resetData(GraphViewDataInterface[] values)
clears the current data and set the new. redraws the graphview(s)

Parameters:
values - new data