public class LineChart extends Object
Constructor and Description |
---|
LineChart() |
Modifier and Type | Method and Description |
---|---|
LineChart |
addEntry(Number y)
Adds the new entry (now(), y) entry, with now the current timestamp.
|
LineChart |
addEntry(Number x,
Number y)
Adds the (x, y) entry into this chart
|
Boolean |
getDrawValues()
Returns whether the y values should be displayed when this chart is showed
|
TimeUnit |
getTimeUnitX()
Returns the nullable time unit used for x axis, if x values should be considered as timestamps
|
String |
getTitle()
Returns the title of this chart
|
List<Number> |
getX()
Returns the list of x values
|
List<Number> |
getY()
Returns the list of y values
|
String |
geYSuffix()
Returns the suffix used when displaying y values
|
boolean |
isShowGrid()
Returns whether this chart should show the grid when it is displayed
|
LineChart |
leftShift(Number y)
Adds the new entry (now(), y) entry, with now the current timestamp.
|
LineChart |
removeEntry(int i)
removes the i-th (x, y) entry
|
LineChart |
removeLastEntry()
Removes the last (x, y) entry
|
LineChart |
setDrawValues(Boolean drawValues)
Sets whether the y values should be displayed when this chart is showed
|
LineChart |
setShowGrid(boolean showGrid)
Sets whether this chart should show the grid when it is displayed (default value is true)
|
LineChart |
setTimeUnitX(TimeUnit timeUnitX)
Set the time unit used to display x axis.
|
LineChart |
setTitle(String title)
Sets the title of this chart
|
LineChart |
setX(List<Number> x)
Sets the list of x values
|
LineChart |
setY(List<Number> y)
Sets the list of y values
|
void |
show()
Displays the this LineChart in a new activity
|
public LineChart setX(List<Number> x)
x
- the valuespublic LineChart setY(List<Number> y)
y
- the valuespublic boolean isShowGrid()
public LineChart setShowGrid(boolean showGrid)
showGrid
- the new valuepublic TimeUnit getTimeUnitX()
public LineChart setTimeUnitX(TimeUnit timeUnitX)
timeUnitX
- the time unitpublic String geYSuffix()
public String getTitle()
public LineChart setTitle(String title)
title
- the titlepublic Boolean getDrawValues()
public LineChart setDrawValues(Boolean drawValues)
drawValues
- the valuepublic void show()
public LineChart addEntry(Number x, Number y)
x
- the entry xy
- the entry ypublic LineChart addEntry(Number y)
y
- the y valuepublic LineChart removeLastEntry()
public LineChart removeEntry(int i)
i
- the y valueCopyright © 2021. All rights reserved.