Skip to main content

ForceDirectedLayoutParameters

Parameters for the force directed layout

Extends

Properties

absoluteBacked?

optional absoluteBacked: boolean

Defaults to false. If true, then the layout will use any position values found in the data for a given vertex.

Inherited from

AbsoluteBackedLayoutParameters.absoluteBacked


height?

optional height: number

Optional fixed height for the layout.

Inherited from

AbsoluteBackedLayoutParameters.height


iterations?

optional iterations: number

Maximum number of iterations to run. Defaults to 50. Increasing this number may result in a nicer output, at the expense of run time.


locationFunction?

optional locationFunction: LocationFunction

Optional function that, given some vertex, can provide the x/y location of the vertex on the canvas

Inherited from

AbsoluteBackedLayoutParameters.locationFunction


padding?

optional padding: PointXY

Optional padding to put around the elements.

Inherited from

AbsoluteBackedLayoutParameters.padding


r?

optional r: number

The amount of travel to impose on each element every time a repulsion or attraction event occurs during the calculation of the layout. This is expressed as a fraction of the distance the two elements would travel in order to be spacing pixels apart. Defaults to 0.25. A value of 1 here may seem desirable but in general will not provide the best results: moving one pair of elements by their ideal amount can negatively affect many others. It is better to provide a fractional value here and allow the layout to compromise.


spacing?

optional spacing: number

Ideal spacing to leave between elements. Defaults to 250px, but this does not mean that elements end up separated by exactly 250px.


width?

optional width: number

Optional fixed width for the layout.

Inherited from

AbsoluteBackedLayoutParameters.width