Skip to content

@eightkk/vue-weave / core / toGraphMl

Function: toGraphMl() ​

toGraphMl(graph, options?): string

Defined in: src/core/interchangeGraphMl.ts:47

Write a diagram as GraphML. The document declares <key>s for the node label, detail, shape, tone, x, y, width and height (the top-left corner from positions and the size from sizes) and the edge label, markerStart, markerEnd, edgeStyle, animated, dashed and points (waypoints as x,y x,y …), and writes the values a node or edge has. Groups become nodes with a nested <graph> (ID <group>:) that holds their members and nested groups; a group whose ID is also a node's gets a -2 suffix, since GraphML node IDs share one namespace. Edges are written in the top-level graph after the nodes. Ports and data are not written. Throws the Errors and RangeErrors of NetworkGraph's input checks.

Parameters ​

graph ​

GraphInterchangeInput

options? ​

GraphMlOptions = {}

Returns ​

string

Released under the MIT License.