Class XYChart.Series<X,Y>
java.lang.Object
javafx.scene.chart.XYChart.Series<X,Y>
Property Summary
| Type | Property | Description |
|---|---|---|
final ReadOnlyObjectProperty |
chart |
Reference to the chart this series belongs to |
final ObjectProperty |
data |
ObservableList of data items that make up this series |
final StringProperty |
name |
The user displayable name for this series |
final ObjectProperty |
node |
The node to display for this series. |
Constructor Summary
| Constructor | Description |
|---|---|
Series() |
Construct a empty series |
Series |
Constructs a named Series and populates it with the given ObservableList data. |
Series |
Constructs a Series and populates it with the given ObservableList data. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
final ReadOnlyObjectProperty |
chartProperty() |
Reference to the chart this series belongs to |
final ObjectProperty |
dataProperty() |
ObservableList of data items that make up this series |
final XYChart |
getChart() |
Gets the value of the chart property. |
final ObservableList |
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 |
nodeProperty() |
The node to display for this series. |
final void |
setData |
Sets the value of the data property. |
final void |
setName |
Sets the value of the name property. |
final void |
setNode |
Sets the value of the node property. |
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:
name
public final StringProperty nameProperty
The user displayable name for this series
- See Also:
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:
data
public final ObjectProperty<ObservableList<XYChart.Data<X,Y>>> dataProperty
ObservableList of data items that make up this series
- See Also:
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
chartproperty - See Also:
chartProperty
public final ReadOnlyObjectProperty<XYChart<X,Y>> chartProperty()
Reference to the chart this series belongs to
- Returns:
- the
chartproperty - See Also:
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
nameproperty - See Also:
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 thenameproperty - See Also:
nameProperty
public final StringProperty nameProperty()
The user displayable name for this series
- Returns:
- the
nameproperty - See Also:
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
nodeproperty - See Also:
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 thenodeproperty - See Also:
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
nodeproperty - See Also:
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
dataproperty - See Also:
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 thedataproperty - See Also:
dataProperty
public final ObjectProperty<ObservableList<XYChart.Data<X,Y>>> dataProperty()
ObservableList of data items that make up this series
- Returns:
- the
dataproperty - See Also:
toString
© 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.