org.faceless.graph2
Class AreaSeries

java.lang.Object
  extended by org.faceless.graph2.Series
      extended by org.faceless.graph2.AreaSeries

public class AreaSeries
extends Series

An AreaSeries is used to plot several AbstractLineSeries, one on top of eachother, with the space under each line filled. So, for example, to plot two sets of data:

 LineSeries series1 = new LineSeries("First");
 series1.set(0,0);
 series1.set(5,5);
 LineSeries series2 = new LineSeries("Second");
 series1.set(0,2);
 series1.set(5,4);

 AreaSeries series = new AreaSeries("Both");
 series.add(series1);
 series.add(series2);
 


Constructor Summary
AreaSeries(String name)
          Create a new AreaSeries
 
Method Summary
 void add(AbstractLineSeries series)
          Add a LineSeries to this Series
 void setPreAccumulated(boolean on)
          Sets whether the values in the Line series have already been totaled up.
 
Methods inherited from class org.faceless.graph2.Series
addBox, addLine, addMarker, getName, outputToSeries, outputToSeriesFunction, setStyle, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AreaSeries

public AreaSeries(String name)
Create a new AreaSeries

Parameters:
name - the name of the Series
Method Detail

setPreAccumulated

public void setPreAccumulated(boolean on)
Sets whether the values in the Line series have already been totaled up. For instance, if the first series has f(x)=4 and the second series has f(x)=6, when this flag is set then the values will be plotted exactly as specified - 4 and 6. If this flag is false (the default), the value from the first series will be plotted at 4, and the second at 10.

Parameters:
on - whether to consider the values in the series as already accumulated. Default is false

add

public void add(AbstractLineSeries series)
Add a LineSeries to this Series

Parameters:
series - the series to add
Throws:
IllegalArgumentException - if this series has already been added


Copyright © 2001-2011 Big Faceless Organization