Skip to content
  1. API
  2. Types

NodeClusteringOptions

Type: object

Properties

  • options(optional)
    • edgeGenerator(optional) function(edges: EdgeList, clusterId: string, transformation: Transformation): EdgeDataAndAttributes If groupEdges is true, indicates the function used to generate the new edges from the sub-edges. Ignored if clusterEdges is false.
    • enabled(optional) boolean[=true] Indicates if the clustering must be enabled.
    • groupIdFunction(optional) function(node: RawNode): string Given a node, must return a string identifying a cluster. All nodes for which the function returns the same value will be clustered together. By default cluster all the nodes that were selected together.
    • groupSelfLoopEdges(optional) boolean[=false] If true, edges for which the two extremities end up being clustered into the same node will be displayed as a self-loop edge, instead of not being displayed at all.
    • nodeGenerator(optional) function(nodes: NodeList, clusterId: string, transformation: Transformation): NodeDataAndAttributes Given a list of nodes that should be clustered together, must return the new node (meta-node) to be added. If attributes.x and attributes.y are not specified, the meta-node will be put at the center of the nodes.
    • selector(optional) function(node: RawNode): boolean Only nodes that match this criteria will be clustered with other nodes. By default, all the nodes will be assigned a cluster.