Class XYChart.Series<X,Y>
java.lang.Object
javafx.scene.chart.XYChart.Series<X,Y>
- 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
| Type | Property | Description |
|---|---|---|
ReadOnlyObjectProperty<XYChart<X,Y>> | chart | Reference to the chart this series belongs to |
ObjectProperty<ObservableList<XYChart.Data<X,Y>>> | data | ObservableList of data items that make up this series |
StringProperty | name | The user displayable name for this series |
ObjectProperty<Node> | node | The node to display for this series. |
Constructor Summary
| 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 |
|---|---|---|
ReadOnlyObjectProperty<XYChart<X,Y>> | chartProperty() | Reference to the chart this series belongs to |
ObjectProperty<ObservableList<XYChart.Data<X,Y>>> | dataProperty() | ObservableList of data items that make up this series |
XYChart<X,Y> | getChart() | Gets the value of the property chart. |
ObservableList<XYChart.Data<X,Y>> | getData() | Gets the value of the property data. |
String | getName() | Gets the value of the property name. |
Node | getNode() | Gets the value of the property node. |
StringProperty | nameProperty() | The user displayable name for this series |
ObjectProperty<Node> | nodeProperty() | The node to display for this series. |
void | setData(ObservableList<XYChart.Data<X,Y>> value) | Sets the value of the property data. |
void | setName(String value) | Sets the value of the property name. |
void | setNode(Node value) | Sets the value of the property node. |
String | toString() | Returns a string representation of this Series object. |
Property Details
chart
public final ReadOnlyObjectProperty<XYChart<X,Y>> chartProperty
Reference to the chart this series belongs to
- See Also:
getChart()
name
public final StringProperty nameProperty
The user displayable name for this series
- See Also:
-
getName(),setName(String)
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)
data
public final ObjectProperty<ObservableList<XYChart.Data<X,Y>>> dataProperty
ObservableList of data items that make up this series
- See Also:
-
getData(),setData(ObservableList)
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 property chart.
- Property description:
- Reference to the chart this series belongs to
chartProperty
public final ReadOnlyObjectProperty<XYChart<X,Y>> chartProperty()
Reference to the chart this series belongs to
- See Also:
getChart()
getName
public final String getName()
Gets the value of the property name.
- Property description:
- The user displayable name for this series
setName
public final void setName(String value)
Sets the value of the property name.
- Property description:
- The user displayable name for this series
nameProperty
public final StringProperty nameProperty()
The user displayable name for this series
- See Also:
-
getName(),setName(String)
getNode
public final Node getNode()
Gets the value of the property node.
- 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.
setNode
public final void setNode(Node value)
Sets the value of the property node.
- 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.
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.
- See Also:
-
getNode(),setNode(Node)
getData
public final ObservableList<XYChart.Data<X,Y>> getData()
Gets the value of the property data.
- Property description:
- ObservableList of data items that make up this series
setData
public final void setData(ObservableList<XYChart.Data<X,Y>> value)
Sets the value of the property data.
- Property description:
- ObservableList of data items that make up this series
dataProperty
public final ObjectProperty<ObservableList<XYChart.Data<X,Y>>> dataProperty()
ObservableList of data items that make up this series
- See Also:
-
getData(),setData(ObservableList)
toString
public String toString()
Returns a string representation of this
Series object.- Overrides:
-
toStringin classObject - Returns:
- a string representation of this
Seriesobject.
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.