|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.graph2.Series
org.faceless.graph2.AbstractLineSeries
org.faceless.graph2.LineSeries
public class LineSeries
The LineSeries represents the data found on a typical line graph - a collection
of sampled values. Samples are set using the set(double, double)
method. For example,
to plot a simple LineGraph:
LineSeries series = new LineSeries("Samples"); series.set(1, 10); series.set(3, 12); series.set(7, 5); axesgraph.addSeries(series);See the
DateAxis
API documentation to see how to plot dates on a LineSeries.
DateAxis
,
AreaSeries
Constructor Summary | |
---|---|
LineSeries(String name)
Create a new LineSeries |
Method Summary | |
---|---|
SortedMap |
getData()
Return a SortedMap containing a copy of all the data
points of this LineSeries, where the X and Y values
are the Key and Value, stored as Double s. |
void |
set(double x,
double y)
Set a value on the graph. |
void |
setMaxDataPoints(int points)
Set the maximum number of data points that will be drawn with this LineSeries. |
String |
toString()
|
Methods inherited from class org.faceless.graph2.AbstractLineSeries |
---|
setDepth |
Methods inherited from class org.faceless.graph2.Series |
---|
addBox, addLine, addMarker, getName, outputToSeries, outputToSeriesFunction, setStyle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LineSeries(String name)
name
- the name of the seriesMethod Detail |
---|
public void set(double x, double y)
x
parameter specifies the horizontal
position on the graph, and must be a real number. The y
parameter
specifies the vertical position, and may be a real number or Double.NaN
,
which will result in a gap in the line where that point would have been.
x
- the X co-ordinate of the sampley
- the Y co-ordinate of the samplepublic SortedMap getData()
SortedMap
containing a copy of all the data
points of this LineSeries, where the X and Y values
are the Key and Value, stored as Double
s.
public void setMaxDataPoints(int points)
points
- the maximum number of data points to plot in this series, or 0
to not set a maximumpublic String toString()
toString
in class Series
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |