Skip to content

Interface: BundleOptions ​

Options of bundleLinks: the method, the shared strength, and the options of both methods (each reads its own and ignores the other's).

Extends ​

Properties ​

PropertyModifierTypeDescriptionOverridesInherited from
candidates?readonlynumberLinks examined per link at most when looking for compatible ones. Default 1,000.-ForceBundleOptions.candidates
compatibility?readonlynumberCompatibility two links need to attract each other, 0 to 1 (see the module comment). Lower values bundle more links, also ones that do not belong together; at 0 the search has no distance limit and only candidates bounds it. Default 0.6.-ForceBundleOptions.compatibility
cycles?readonlynumberRefinement cycles, 1 to 7: a link has 2^(cycles − 1) subdivision points at the end. Default 6 (32 points).-ForceBundleOptions.cycles
groupParent?readonlyInt32Array<ArrayBufferLike>Parent group of each group, -1 for a top-level group: a hierarchy of groups deeper than one level. Only with hierarchy: 'groups'. Default: none (every group is top level).-HierarchicalBundleOptions.groupParent
hierarchy?readonly"groups" | "parents"What the hierarchy is made of (see the module comment): 'groups' reads graph.group (and groupParent), 'parents' reads graph.parent. Default: 'groups' when the graph has groups, else 'parents' when it has parent. When the graph has neither, or not the one asked for, nothing is bundled.-HierarchicalBundleOptions.hierarchy
iterations?readonlynumberIterations of the first cycle, 1,000 at most; each later cycle runs two thirds of the one before. Default 50.-ForceBundleOptions.iterations
maxLinks?readonlynumberSize cap: with more links that can be bundled than this, nothing is bundled and the result says refused. Default 20,000.-ForceBundleOptions.maxLinks
maxNeighbours?readonlynumberCompatible links kept per link at most, the most compatible first. Default 32.-ForceBundleOptions.maxNeighbours
method?readonly"auto" | "force" | "hierarchical"'auto' (default): 'hierarchical' when the graph has groups (group with groups > 0 and at least one node in a group), or when hierarchy: 'parents' is asked for and the graph has parent; else 'force'. Naming a method runs that one and never the other: 'hierarchical' on a graph without a hierarchy bundles nothing.--
sameGroupStrength?readonlynumberFactor on strength for links whose path has 3 points (the two ends have the same parent), 0 to 1, so that links inside a group bend less than links between groups. Default 0.5.-HierarchicalBundleOptions.sameGroupStrength
smoothing?readonlynumber[1 2 1] / 4 smoothing passes over the final points, 0 to 8. Default 1.-ForceBundleOptions.smoothing
stiffness?readonlynumberStiffness of the links, 0 to 0.5: the paper's spring constant K. Higher values keep links straighter and bundles looser. Default 0.1.-ForceBundleOptions.stiffness
strength?readonlynumber0 = straight links … 1 = fully bundled. Default 0.85.HierarchicalBundleOptions.strength-
tolerance?readonlynumberPoints of a route closer than this to the line through the points kept are dropped (Ramer–Douglas–Peucker), in layout units. 0 keeps every subdivision point. Default 0.25.-ForceBundleOptions.tolerance

Released under the MIT License.