Class NodeSeries
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.AbstractSeries
com.vaadin.flow.component.charts.model.NodeSeries
- All Implemented Interfaces:
Series
,Serializable
A series containing nodes and links to nodes.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds both nodes and links then in the series.void
add
(NodeSeriesItem nodeSeriesItem) Adds a data item.void
Adds a node to the chart.getData()
getNodes()
void
Removes the node.void
remove
(NodeSeriesItem nodeSeriesItem) Removes the nodeSeriesItem.Methods inherited from class com.vaadin.flow.component.charts.model.AbstractSeries
getColorAxis, getConfiguration, getId, getName, getPlotOptions, getStack, getxAxis, getyAxis, isVisible, setColorAxis, setConfiguration, setId, setName, setPlotOptions, setStack, setVisible, setVisible, setxAxis, setyAxis, setyAxis, updateSeries
-
Constructor Details
-
NodeSeries
public NodeSeries()
-
-
Method Details
-
add
Adds a data item. The to and from nodes must also be added usingaddNode(Node)
- Parameters:
nodeSeriesItem
- item to be added.- Throws:
IllegalArgumentException
- if the nodeSeriesItem is null or if either to or from nodes null or have null ids.
-
add
Adds both nodes and links then in the series.- Parameters:
from
- seeNodeSeriesItem.setFrom(Node)
to
- seeNodeSeriesItem.setTo(Node)
- Returns:
NodeSeriesItem
created.
-
addNode
Adds a node to the chart. To link the added node to other nodes useadd(NodeSeriesItem)
.- Parameters:
node
-Node
to be added. Not null.- Throws:
IllegalArgumentException
- if the node is null or if its id is null.
-
remove
Removes the nodeSeriesItem. To remove the to and from nodes, useremove(Node)
- Parameters:
nodeSeriesItem
- item to be removed.
-
remove
Removes the node. To remove the links, useremove(NodeSeriesItem)
- Parameters:
node
- item to be removed.
-
getData
- Returns:
- The data in this series.
-
getNodes
- Returns:
- The nodes in this Series.
-