com.vaadin.flow.component.charts.model.
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:
public class NodeSeries extends AbstractSeries
A series containing nodes and links to nodes.
See Also:
-
-
Constructor Summary
Constructors Constructor and Description NodeSeries()
-
Method Summary
All Methods Modifier and Type Method and Description NodeSeriesItem
add(Node from, Node to)
Adds both nodes and links then in the series.
void
add(NodeSeriesItem nodeSeriesItem)
Adds a data item.
void
addNode(Node node)
Adds a node to the chart.
List<NodeSeriesItem>
getData()
Set<Node>
getNodes()
void
remove(Node node)
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
-
-
-
-
Method Detail
-
add
public void add(NodeSeriesItem nodeSeriesItem)
Adds a data item. The to and from nodes must also be added using
addNode(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
public NodeSeriesItem add(Node from, Node to)
Adds both nodes and links then in the series.
Parameters:
from
- seeNodeSeriesItem.setFrom(Node)
to
- seeNodeSeriesItem.setTo(Node)
Returns:
NodeSeriesItem
created.
-
addNode
public void addNode(Node node)
Adds a node to the chart. To link the added node to other nodes use
add(NodeSeriesItem)
.Parameters:
node
-Node
to be added. Not null.Throws:
IllegalArgumentException
- if the node is null or if its id is null.
-
remove
public void remove(NodeSeriesItem nodeSeriesItem)
Removes the nodeSeriesItem. To remove the to and from nodes, use
remove(Node)
Parameters:
nodeSeriesItem
- item to be removed.
-
remove
public void remove(Node node)
Removes the node. To remove the links, use
remove(NodeSeriesItem)
Parameters:
node
- item to be removed.
-
getData
public List<NodeSeriesItem> getData()
Returns:
The data in this series.
-
-