Skip to main content

BowtieLayoutParameters

Options for the Bowtie layout

Extends

Properties

axis?

optional axis: "horizontal" | "vertical"

Whether to draw the layout horizontally or vertically. Defaults to "horizontal".


childVerticesFunction()?

optional childVerticesFunction: (node, dataSource) => HasIdAndType[]

Optional function to invoke on any non-focus vertex, to get the vertex's children. Will not be invoked with the focus vertex. If this function returns the focus vertex in its set it will be filtered out. When you do not provide this function, VisuallyJs will find all vertices that are targets of edges for which this vertex is a source.

Parameters

node

HasIdAndType

dataSource

DataSource

Returns

HasIdAndType[]


getDownstream()

getDownstream: (dataSource, vertex) => HasIdAndType[]

Gets immediate downstream nodes for the focus vertex. Only invoked with the focus vertex.

Parameters

dataSource

DataSource

vertex

HasIdAndType

Returns

HasIdAndType[]


getRootNode()?

optional getRootNode: (dataSource) => string | Vertex

Optional function you can provide that will dynamically be invoked to get the root node to use. You must provide this or rootNode.

Parameters

dataSource

DataSource

Returns

string | Vertex


getUpstream()

getUpstream: (dataSource, vertex) => HasIdAndType[]

Gets immediate upstream nodes for the focus vertex. Only invoked with the focus vertex.

Parameters

dataSource

DataSource

vertex

HasIdAndType

Returns

HasIdAndType[]


height?

optional height: number

Optional fixed height for the layout.

Inherited from

LayoutParameters.height


locationFunction?

optional locationFunction: LocationFunction

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

Inherited from

LayoutParameters.locationFunction


padding?

optional padding: PointXY

Optional padding to put around the elements.

Inherited from

LayoutParameters.padding


rootNode?

optional rootNode: string | Vertex

Optional node to use as the root. You must provide this or getRootNode.


width?

optional width: number

Optional fixed width for the layout.

Inherited from

LayoutParameters.width