MAIDR JavaScript API
    Preparing search index...
    • Creates a MAIDR figure from a Graphviz drawing on the page.

      Call it once the SVG is in the document: the layer's selectors name the drawing's own node groups, and each group is marked so it can be named however many graphs share the page.

      Unless options.language names one, the one word the adapter writes itself -- a patchwork drawing's Area -- is in the language MAIDR speaks to the reader, and is written again when the reader changes it.

      Parameters

      Returns Maidr

      The MAIDR figure, ready for the maidr attribute

      Error when the SVG is not a Graphviz drawing. A drawing with no nodes becomes a figure with no layers, which MAIDR announces as empty

      const svg = document.querySelector('#pipeline svg');
      svg.setAttribute('maidr', JSON.stringify(maidrGraphviz.createMaidrFromGraphviz(svg)));