60 import javafx.scene.layout.Region;
61 import javafx.scene.shape.Arc;
62 import javafx.scene.shape.ArcTo;
63 import javafx.scene.shape.ArcType;
64 import javafx.scene.shape.ClosePath;
65 import javafx.scene.shape.LineTo;
66 import javafx.scene.shape.MoveTo;
67 import javafx.scene.shape.Path;
68 import javafx.scene.text.Text;
69 import javafx.scene.transform.Scale;
70 import javafx.util.Duration;
71
72 import com.sun.javafx.charts.Legend;
73 import com.sun.javafx.charts.Legend.LegendItem;
74 import com.sun.javafx.collections.NonIterableChange;
75
76 import javafx.css.StyleableBooleanProperty;
77 import javafx.css.StyleableDoubleProperty;
78 import javafx.css.CssMetaData;
79
80 import com.sun.javafx.css.converters.BooleanConverter;
81 import com.sun.javafx.css.converters.SizeConverter;
82 import java.util.BitSet;
83
84 import javafx.css.Styleable;
85 import javafx.css.StyleableProperty;
86
87 /**
88 * Displays a PieChart. The chart content is populated by pie slices based on
89 * data set on the PieChart.
90 * <p> The clockwise property is set to true by default, which means slices are
91 * placed in the clockwise order. The labelsVisible property is used to either display
92 * pie slice labels or not.
93 *
94 * @since JavaFX 2.0
95 */
96 public class PieChart extends Chart {
97
98 // -------------- PRIVATE FIELDS -----------------------------------------------------------------------------------
99 private static final int MIN_PIE_RADIUS = 25;
100 private static final double LABEL_TICK_GAP = 6;
101 private static final double LABEL_BALL_RADIUS = 2;
|
60 import javafx.scene.layout.Region;
61 import javafx.scene.shape.Arc;
62 import javafx.scene.shape.ArcTo;
63 import javafx.scene.shape.ArcType;
64 import javafx.scene.shape.ClosePath;
65 import javafx.scene.shape.LineTo;
66 import javafx.scene.shape.MoveTo;
67 import javafx.scene.shape.Path;
68 import javafx.scene.text.Text;
69 import javafx.scene.transform.Scale;
70 import javafx.util.Duration;
71
72 import com.sun.javafx.charts.Legend;
73 import com.sun.javafx.charts.Legend.LegendItem;
74 import com.sun.javafx.collections.NonIterableChange;
75
76 import javafx.css.StyleableBooleanProperty;
77 import javafx.css.StyleableDoubleProperty;
78 import javafx.css.CssMetaData;
79
80 import javafx.css.converter.BooleanConverter;
81 import javafx.css.converter.SizeConverter;
82 import java.util.BitSet;
83
84 import javafx.css.Styleable;
85 import javafx.css.StyleableProperty;
86
87 /**
88 * Displays a PieChart. The chart content is populated by pie slices based on
89 * data set on the PieChart.
90 * <p> The clockwise property is set to true by default, which means slices are
91 * placed in the clockwise order. The labelsVisible property is used to either display
92 * pie slice labels or not.
93 *
94 * @since JavaFX 2.0
95 */
96 public class PieChart extends Chart {
97
98 // -------------- PRIVATE FIELDS -----------------------------------------------------------------------------------
99 private static final int MIN_PIE_RADIUS = 25;
100 private static final double LABEL_TICK_GAP = 6;
101 private static final double LABEL_BALL_RADIUS = 2;
|