MAIDR JavaScript API
    Preparing search index...
    • Binds a D3.js directed graph to MAIDR.

      Calling this binder is the declaration that the links have a direction: each points from its source to its target. Point selector at the links and, to have the node a reader is on outlined, nodeSelector at the nodes -- one element per node, whose datum names it as a link's end does.

      Parameters

      • svg: Element

        The SVG element containing the D3 graph.

      • config: D3DirectedGraphConfig

        Configuration naming the links, and optionally the nodes.

      Returns D3BinderResult

      A D3BinderResult with the MAIDR data and generated layer.

      bindD3DirectedGraph(svgElement, {
      selector: 'line.edge',
      nodeSelector: 'circle.op',
      label: 'name',
      });