Skip to content
  1. API
  2. Types

EdgeGroupingOptions

Type: object

Properties

  • duration(optional) number Animation time in milliseconds. The animation will be played once after the creation of the group. Ignored if enabled is false.
  • easing(optional) EasingFunction[="quadraticOut"] Grouping animation easing function.
  • enabled(optional) boolean Indicates if the edge grouping must be enabled.
  • generator(optional) function(edges: EdgeList, groupId: string, transformation: Transformation): EdgeDataAndAttributes| null Given a list of edges that should be grouped together, must return the new edge (meta-edge) to be added. Returning null means that the edges should not be grouped.
  • groupIdFunction(optional) function(edge: Edge): string|undefined Given an edge, must return a string identifying a group. All edges that are parallel and for which the function returns the same value will be grouped together. By default matches all the edges that are parallel together. The returned string will be used as prefix of the final id. Returning undefined means that the edge should not be grouped.
  • selector(optional) function(edge: Edge): boolean Only edges that match this criteria will be grouped with other edges. By default, all the edges 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.