public class LineSeries extends AbstractLineSeries
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 and Description |
---|
LineSeries(String name)
Create a new LineSeries
|
Modifier and Type | Method and Description |
---|---|
SortedMap |
getData()
|
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() |
setDepth
addBox, addLine, addMarker, getName, outputToSeries, outputToSeriesFunction, setFloatingPointX, setFloatingPointY, setStyle
public LineSeries(String name)
name
- the name of the seriespublic 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 maximumCopyright © 2001-2016 Big Faceless Organization