Skip to main content
AddEdgeOptions
Options for the addEdge method in the VisuallyJsModel class.
NameTypeDescription
anchors?{
  source:SingleAnchorSpec,
  target:SingleAnchorSpec
}
Optional anchors for the edge.
cost?numberOptional edge cost. Defaults to 1.
data?undefinedOptional backing data for the edge.
directed?booleanBy default edges are not directed. This is used only when computing paths between vertices.
geometry?anyOptional edge geometry.
sourcestring | PointXY | VertexSource for the edge - a vertex, vertex id, or canvas location.
targetstring | PointXY | VertexTarget for the edge - a vertex, vertex id, or canvas location.