modules/controls/src/main/java/javafx/scene/chart/StackedAreaChart.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


  28 
  29 import java.util.*;
  30 
  31 import javafx.animation.*;
  32 import javafx.application.Platform;
  33 import javafx.beans.NamedArg;
  34 import javafx.beans.property.DoubleProperty;
  35 import javafx.beans.property.SimpleDoubleProperty;
  36 import javafx.collections.FXCollections;
  37 import javafx.collections.ListChangeListener;
  38 import javafx.collections.ObservableList;
  39 import javafx.scene.AccessibleRole;
  40 import javafx.scene.Group;
  41 import javafx.scene.Node;
  42 import javafx.scene.layout.StackPane;
  43 import javafx.scene.shape.*;
  44 import javafx.util.Duration;
  45 
  46 import com.sun.javafx.charts.Legend;
  47 import com.sun.javafx.charts.Legend.LegendItem;
  48 import com.sun.javafx.css.converters.BooleanConverter;
  49 
  50 import javafx.beans.property.BooleanProperty;
  51 import javafx.beans.value.WritableValue;
  52 import javafx.css.CssMetaData;
  53 import javafx.css.Styleable;
  54 import javafx.css.StyleableBooleanProperty;
  55 import javafx.css.StyleableProperty;
  56 
  57 /**
  58  * StackedAreaChart is a variation of {@link AreaChart} that displays trends of the 
  59  * contribution of each value. (over time e.g.) The areas are stacked so that each 
  60  * series adjoins but does not overlap the preceding series. This contrasts with 
  61  * the Area chart where each series overlays the preceding series. 
  62  * 
  63  * The cumulative nature of the StackedAreaChart gives an idea of the total Y data 
  64  * value at any given point along the X axis.
  65  * 
  66  * Since data points across multiple series may not be common, StackedAreaChart
  67  * interpolates values along the line joining the data points whenever necessary.
  68  * 




  28 
  29 import java.util.*;
  30 
  31 import javafx.animation.*;
  32 import javafx.application.Platform;
  33 import javafx.beans.NamedArg;
  34 import javafx.beans.property.DoubleProperty;
  35 import javafx.beans.property.SimpleDoubleProperty;
  36 import javafx.collections.FXCollections;
  37 import javafx.collections.ListChangeListener;
  38 import javafx.collections.ObservableList;
  39 import javafx.scene.AccessibleRole;
  40 import javafx.scene.Group;
  41 import javafx.scene.Node;
  42 import javafx.scene.layout.StackPane;
  43 import javafx.scene.shape.*;
  44 import javafx.util.Duration;
  45 
  46 import com.sun.javafx.charts.Legend;
  47 import com.sun.javafx.charts.Legend.LegendItem;
  48 import javafx.css.converter.BooleanConverter;
  49 
  50 import javafx.beans.property.BooleanProperty;
  51 import javafx.beans.value.WritableValue;
  52 import javafx.css.CssMetaData;
  53 import javafx.css.Styleable;
  54 import javafx.css.StyleableBooleanProperty;
  55 import javafx.css.StyleableProperty;
  56 
  57 /**
  58  * StackedAreaChart is a variation of {@link AreaChart} that displays trends of the 
  59  * contribution of each value. (over time e.g.) The areas are stacked so that each 
  60  * series adjoins but does not overlap the preceding series. This contrasts with 
  61  * the Area chart where each series overlays the preceding series. 
  62  * 
  63  * The cumulative nature of the StackedAreaChart gives an idea of the total Y data 
  64  * value at any given point along the X axis.
  65  * 
  66  * Since data points across multiple series may not be common, StackedAreaChart
  67  * interpolates values along the line joining the data points whenever necessary.
  68  *