# Class PieChart.Data

java.lang.Object
javafx.scene.chart.PieChart.Data

Enclosing class:
  `PieChart`

public static final class PieChart.Data extends Object
PieChart Data Item, represents one slice in the PieChart

Since:
  JavaFX 2.0

- ## Property Summary

  Properties
  Type
  Property
  Description
  `final ReadOnlyObjectProperty<PieChart>`
  `chart`
  The chart which this data belongs to.
  `final StringProperty`
  `name`
  The name of the pie slice
  `ReadOnlyObjectProperty<Node>`
  `node`
  Readonly access to the node that represents the pie slice.
  `final DoubleProperty`
  `pieValue`
  The value of the pie slice

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Data(String name, double value)`
  Constructs a PieChart.Data object with the given name and value.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final ReadOnlyObjectProperty<PieChart>`
  `chartProperty()`
  The chart which this data belongs to.
  `final PieChart`
  `getChart()`
  Gets the value of the `chart` property.
  `final String`
  `getName()`
  Gets the value of the `name` property.
  `Node`
  `getNode()`
  Returns the node that represents the pie slice.
  `final double`
  `getPieValue()`
  Gets the value of the `pieValue` property.
  `final StringProperty`
  `nameProperty()`
  The name of the pie slice
  `ReadOnlyObjectProperty<Node>`
  `nodeProperty()`
  Readonly access to the node that represents the pie slice.
  `final DoubleProperty`
  `pieValueProperty()`
  The value of the pie slice
  `final void`
  `setName(String value)`
  Sets the value of the `name` property.
  `final void`
  `setPieValue(double value)`
  Sets the value of the `pieValue` property.
  `String`
  `toString()`
  Returns a string representation of this `Data` object.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Property Details

  - ### chart

    public final ReadOnlyObjectProperty<PieChart> chartProperty
    The chart which this data belongs to.
    See Also:
      - `getChart()`
      - `chartProperty()`

  - ### name

    public final StringProperty nameProperty
    The name of the pie slice
    See Also:
      - `getName()`
      - `setName(String)`
      - `nameProperty()`

  - ### pieValue

    public final DoubleProperty pieValueProperty
    The value of the pie slice
    See Also:
      - `getPieValue()`
      - `setPieValue(double)`
      - `pieValueProperty()`

  - ### node

    public ReadOnlyObjectProperty<Node> nodeProperty
    Readonly access to the node that represents the pie slice. You can use this to add mouse event listeners etc.
    See Also:
      - `getNode()`
      - `nodeProperty()`

- ## Constructor Details

  - ### Data

    public Data(String name, double value)
    Constructs a PieChart.Data object with the given name and value.
    Parameters:
      `name` - name for Pie
      `value` - pie value

- ## Method Details

  - ### getChart

    public final PieChart getChart()
    Gets the value of the `chart` property.
    Property description:
      The chart which this data belongs to.
    Returns:
      the value of the `chart` property
    See Also:
      - `chartProperty()`

  - ### chartProperty

    public final ReadOnlyObjectProperty<PieChart> chartProperty()
    The chart which this data belongs to.
    Returns:
      the `chart` property
    See Also:
      - `getChart()`

  - ### setName

    public final void setName(String value)
    Sets the value of the `name` property.
    Property description:
      The name of the pie slice
    Parameters:
      `value` - the value for the `name` property
    See Also:
      - `getName()`
      - `nameProperty()`

  - ### getName

    public final String getName()
    Gets the value of the `name` property.
    Property description:
      The name of the pie slice
    Returns:
      the value of the `name` property
    See Also:
      - `setName(String)`
      - `nameProperty()`

  - ### nameProperty

    public final StringProperty nameProperty()
    The name of the pie slice
    Returns:
      the `name` property
    See Also:
      - `getName()`
      - `setName(String)`

  - ### getPieValue

    public final double getPieValue()
    Gets the value of the `pieValue` property.
    Property description:
      The value of the pie slice
    Returns:
      the value of the `pieValue` property
    See Also:
      - `setPieValue(double)`
      - `pieValueProperty()`

  - ### setPieValue

    public final void setPieValue(double value)
    Sets the value of the `pieValue` property.
    Property description:
      The value of the pie slice
    Parameters:
      `value` - the value for the `pieValue` property
    See Also:
      - `getPieValue()`
      - `pieValueProperty()`

  - ### pieValueProperty

    public final DoubleProperty pieValueProperty()
    The value of the pie slice
    Returns:
      the `pieValue` property
    See Also:
      - `getPieValue()`
      - `setPieValue(double)`

  - ### getNode

    public Node getNode()
    Returns the node that represents the pie slice. You can use this to add mouse event listeners etc.
    Returns:
      the node that represents the pie slice

  - ### nodeProperty

    public ReadOnlyObjectProperty<Node> nodeProperty()
    Readonly access to the node that represents the pie slice. You can use this to add mouse event listeners etc.
    Returns:
      the `node` property
    See Also:
      - `getNode()`

  - ### toString

    public String toString()
    Returns a string representation of this `Data` object.
    Overrides:
      `toString` in class `Object`
    Returns:
      a string representation of this `Data` object.