|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLinearLayout
com.jjoe64.graphview.GraphView
public class GraphView
GraphView creates a scaled line graph with x and y axis labels.
Nested Class Summary | |
---|---|
static class |
GraphView.GraphViewData
one data set for the graph |
Constructor Summary | |
---|---|
GraphView(Context context,
GraphView.GraphViewData[] values,
java.lang.String title,
java.lang.String[] horlabels,
java.lang.String[] verlabels)
|
Method Summary | |
---|---|
protected java.lang.String |
formatLabel(double value)
formats the label can be overwritten |
boolean |
getDrawBackground()
|
boolean |
isScrollable()
|
void |
setDrawBackground(boolean drawBackground)
|
void |
setScalable(boolean scalable)
this forces scrollable = true |
void |
setScrollable(boolean scrollable)
the user can scroll (horizontal) the graph. |
void |
setViewPort(double start,
double size)
set's the viewport for the graph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphView(Context context, GraphView.GraphViewData[] values, java.lang.String title, java.lang.String[] horlabels, java.lang.String[] verlabels)
context
- values
- must be sorted by valueX ASCtitle
- [optional]horlabels
- [optional] if null, labels were generated automaticallyverlabels
- [optional] if null, labels were generated automaticallyMethod Detail |
---|
protected java.lang.String formatLabel(double value)
value
- x and y values
public boolean getDrawBackground()
public boolean isScrollable()
public void setDrawBackground(boolean drawBackground)
drawBackground
- true for a light blue background under the graph linepublic void setScalable(boolean scalable)
scalable
- public void setScrollable(boolean scrollable)
setViewPort(double, double)
which doesn't displays all data.
scrollable
- public void setViewPort(double start, double size)
start
- x-valuesize
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |