Skip to content
  1. API
  2. Types

GeoClusteringOptions

Type: object

Properties

  • edgeGenerator(optional) function(edges: EdgeList, groupId: string, transformation: Transformation): EdgeDataAndAttributes|null If groupEdges is true, indicates the function used to generate the new edges from the sub-edges. Ignored if groupEdges is false. If returned null, the meta edge will not be created.
  • enabled(optional) boolean Indicates if the grouping must be enabled.
  • groupEdges(optional) boolean Indicates if parallel edges that end up having at least one meta-node extremity should be grouped together (to reduce cluttering).
  • groupIdFunction(optional) function(node: Node): string|undefined Given a node, must return a string identifying a group. All nodes for which the function returns the same value will be grouped together. By default group all the nodes that were selected together.
  • groupSelfLoopEdges(optional) boolean If true, edges for which the two extremities end up being grouped into the same node will be displayed as a self-loop edge, instead of not being displayed at all.
  • nodeGenerator(optional) function(nodes: NodeList, groupId: string, transformation: Transformation): NodeDataAndAttributes|null Given a list of nodes that should be grouped together, must return the new node (meta-node) to be added. The latitude and longitude of the meta-node will be the average of the latitude and longitude of the nodes. If null is returned, the meta-node will not be created.
  • onCreated(optional) function(metaNode: Node, showContents: boolean, subNodes: NodeList, subEdges: EdgeList): Promise<any> This is a callback called after a new group is created. See {@link ./tutorials/grouping/index.html | here} for more details.
  • radius(optional) number The radius in which a node gets grouped to annother one.
  • selector(optional) function(node: Node): boolean Only nodes that match this criteria will be grouped with other nodes. By default, all the nodes will be assigned a group.
  • separateEdgesByDirection(optional) boolean By default, edges that have opposite source and target are grouped together (resulting source and target not deterministic). If this option is true, they will not be grouped together.