# Class XYChart.Series<X,Y>

java.lang.Object
javafx.scene.chart.XYChart.Series<X,Y>

Type Parameters:
  `X` - the series X value type
  `Y` - the series Y value type

Enclosing class:
  `XYChart<X,Y>`

public static final class XYChart.Series<X,Y> extends Object
A named series of data items

Since:
  JavaFX 2.0

- ## Property Summary

  Properties
  Type
  Property
  Description
  `final ReadOnlyObjectProperty<XYChart<X,Y>>`
  `chart`
  Reference to the chart this series belongs to
  `final ObjectProperty<ObservableList<XYChart.Data<X,Y>>>`
  `data`
  ObservableList of data items that make up this series
  `final StringProperty`
  `name`
  The user displayable name for this series
  `final ObjectProperty<Node>`
  `node`
  The node to display for this series.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Series()`
  Construct a empty series
  `Series(String name, ObservableList<XYChart.Data<X,Y>> data)`
  Constructs a named Series and populates it with the given `ObservableList` data.
  `Series(ObservableList<XYChart.Data<X,Y>> data)`
  Constructs a Series and populates it with the given `ObservableList` data.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final ReadOnlyObjectProperty<XYChart<X,Y>>`
  `chartProperty()`
  Reference to the chart this series belongs to
  `final ObjectProperty<ObservableList<XYChart.Data<X,Y>>>`
  `dataProperty()`
  ObservableList of data items that make up this series
  `final XYChart<X,Y>`
  `getChart()`
  Gets the value of the `chart` property.
  `final ObservableList<XYChart.Data<X,Y>>`
  `getData()`
  Gets the value of the `data` property.
  `final String`
  `getName()`
  Gets the value of the `name` property.
  `final Node`
  `getNode()`
  Gets the value of the `node` property.
  `final StringProperty`
  `nameProperty()`
  The user displayable name for this series
  `final ObjectProperty<Node>`
  `nodeProperty()`
  The node to display for this series.
  `final void`
  `setData(ObservableList<XYChart.Data<X,Y>> value)`
  Sets the value of the `data` property.
  `final void`
  `setName(String value)`
  Sets the value of the `name` property.
  `final void`
  `setNode(Node value)`
  Sets the value of the `node` property.
  `String`
  `toString()`
  Returns a string representation of this `Series` object.

  ### Methods declared in class java.lang.Object

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

- ## Property Details

  - ### chart

    public final ReadOnlyObjectProperty<XYChart<X,Y>> chartProperty
    Reference to the chart this series belongs to
    See Also:
      - `getChart()`
      - `chartProperty()`

  - ### name

    public final StringProperty nameProperty
    The user displayable name for this series
    See Also:
      - `getName()`
      - `setName(String)`
      - `nameProperty()`

  - ### node

    public final ObjectProperty<Node> nodeProperty
    The node to display for this series. This is created by the chart if it uses nodes to represent the whole series. For example line chart uses this for the line but scatter chart does not use it. This node will be set as soon as the series is added to the chart. You can then get it to add mouse listeners etc.
    See Also:
      - `getNode()`
      - `setNode(Node)`
      - `nodeProperty()`

  - ### data

    public final ObjectProperty<ObservableList<XYChart.Data<X,Y>>> dataProperty
    ObservableList of data items that make up this series
    See Also:
      - `getData()`
      - `setData(ObservableList)`
      - `dataProperty()`

- ## Constructor Details

  - ### Series

    public Series()
    Construct a empty series

  - ### Series

    public Series(ObservableList<XYChart.Data<X,Y>> data)
    Constructs a Series and populates it with the given `ObservableList` data.
    Parameters:
      `data` - ObservableList of XYChart.Data

  - ### Series

    public Series(String name, ObservableList<XYChart.Data<X,Y>> data)
    Constructs a named Series and populates it with the given `ObservableList` data.
    Parameters:
      `name` - a name for the series
      `data` - ObservableList of XYChart.Data

- ## Method Details

  - ### getChart

    public final XYChart<X,Y> getChart()
    Gets the value of the `chart` property.
    Property description:
      Reference to the chart this series belongs to
    Returns:
      the value of the `chart` property
    See Also:
      - `chartProperty()`

  - ### chartProperty

    public final ReadOnlyObjectProperty<XYChart<X,Y>> chartProperty()
    Reference to the chart this series belongs to
    Returns:
      the `chart` property
    See Also:
      - `getChart()`

  - ### getName

    public final String getName()
    Gets the value of the `name` property.
    Property description:
      The user displayable name for this series
    Returns:
      the value of the `name` property
    See Also:
      - `setName(String)`
      - `nameProperty()`

  - ### setName

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

  - ### nameProperty

    public final StringProperty nameProperty()
    The user displayable name for this series
    Returns:
      the `name` property
    See Also:
      - `getName()`
      - `setName(String)`

  - ### getNode

    public final Node getNode()
    Gets the value of the `node` property.
    Property description:
      The node to display for this series. This is created by the chart if it uses nodes to represent the whole series. For example line chart uses this for the line but scatter chart does not use it. This node will be set as soon as the series is added to the chart. You can then get it to add mouse listeners etc.
    Returns:
      the value of the `node` property
    See Also:
      - `setNode(Node)`
      - `nodeProperty()`

  - ### setNode

    public final void setNode(Node value)
    Sets the value of the `node` property.
    Property description:
      The node to display for this series. This is created by the chart if it uses nodes to represent the whole series. For example line chart uses this for the line but scatter chart does not use it. This node will be set as soon as the series is added to the chart. You can then get it to add mouse listeners etc.
    Parameters:
      `value` - the value for the `node` property
    See Also:
      - `getNode()`
      - `nodeProperty()`

  - ### nodeProperty

    public final ObjectProperty<Node> nodeProperty()
    The node to display for this series. This is created by the chart if it uses nodes to represent the whole series. For example line chart uses this for the line but scatter chart does not use it. This node will be set as soon as the series is added to the chart. You can then get it to add mouse listeners etc.
    Returns:
      the `node` property
    See Also:
      - `getNode()`
      - `setNode(Node)`

  - ### getData

    public final ObservableList<XYChart.Data<X,Y>> getData()
    Gets the value of the `data` property.
    Property description:
      ObservableList of data items that make up this series
    Returns:
      the value of the `data` property
    See Also:
      - `setData(ObservableList)`
      - `dataProperty()`

  - ### setData

    public final void setData(ObservableList<XYChart.Data<X,Y>> value)
    Sets the value of the `data` property.
    Property description:
      ObservableList of data items that make up this series
    Parameters:
      `value` - the value for the `data` property
    See Also:
      - `getData()`
      - `dataProperty()`

  - ### dataProperty

    public final ObjectProperty<ObservableList<XYChart.Data<X,Y>>> dataProperty()
    ObservableList of data items that make up this series
    Returns:
      the `data` property
    See Also:
      - `getData()`
      - `setData(ObservableList)`

  - ### toString

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