Class PieChart

  • All Implemented Interfaces:
    Styleable, EventTarget

    public class PieChart
    extends Chart
    Displays a PieChart. The chart content is populated by pie slices based on data set on the PieChart.

    The clockwise property is set to true by default, which means slices are placed in the clockwise order. The labelsVisible property is used to either display pie slice labels or not.

    Since:
    JavaFX 2.0
    • Constructor Detail

      • PieChart

        public PieChart()
        Construct a new empty PieChart.
      • PieChart

        public PieChart​(ObservableList<PieChart.Data> data)
        Construct a new PieChart with the given data
        Parameters:
        data - The data to use, this is the actual list used so any changes to it will be reflected in the chart
    • Method Detail

      • getData

        public final ObservableList<PieChart.Data> getData()
        Gets the value of the property data.
        Property description:
        PieCharts data
      • setData

        public final void setData​(ObservableList<PieChart.Data> value)
        Sets the value of the property data.
        Property description:
        PieCharts data
      • getStartAngle

        public final double getStartAngle()
        Gets the value of the property startAngle.
        Property description:
        The angle to start the first pie slice at
      • setStartAngle

        public final void setStartAngle​(double value)
        Sets the value of the property startAngle.
        Property description:
        The angle to start the first pie slice at
      • setClockwise

        public final void setClockwise​(boolean value)
        Sets the value of the property clockwise.
        Property description:
        When true we start placing slices clockwise from the startAngle
      • isClockwise

        public final boolean isClockwise()
        Gets the value of the property clockwise.
        Property description:
        When true we start placing slices clockwise from the startAngle
      • getLabelLineLength

        public final double getLabelLineLength()
        Gets the value of the property labelLineLength.
        Property description:
        The length of the line from the outside of the pie to the slice labels.
      • setLabelLineLength

        public final void setLabelLineLength​(double value)
        Sets the value of the property labelLineLength.
        Property description:
        The length of the line from the outside of the pie to the slice labels.
      • setLabelsVisible

        public final void setLabelsVisible​(boolean value)
        Sets the value of the property labelsVisible.
        Property description:
        When true pie slice labels are drawn
      • getLabelsVisible

        public final boolean getLabelsVisible()
        Indicates whether pie slice labels are drawn or not
        Returns:
        true if pie slice labels are visible and false otherwise.
      • getClassCssMetaData

        public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
        Returns:
        The CssMetaData associated with this class, which may include the CssMetaData of its superclasses.
        Since:
        JavaFX 8.0