UNPKG

mermaid

Version:

Markdownish syntax for generating flowcharts

52 lines (31 loc) 1.08 kB
#method addVertices Function that adds the vertices found in the graph definition to the graph to be rendered. **Parameters** * Object-containing the vertices. * The-graph that is to be drawn. #declaration style Variable for storing the extracted style for the vertice #method addEdges Add edges to graph based on parsed graph defninition **Parameters** * edges-The edges to add to the graph * g-The graph object #function draw Draws a flowchart in the tag with id: id based on the graph definition in text. **Parameters** * - * - #function init Function that goes through the document to find the chart definitions in there and render them. The function tags the processed attributes with the attribute data-processed and ignores found elements with the attribute already set. This way the init function can be triggered several times. ``` graph LR; a(Find elements)-->b{Processed}; b-->|Yes|c(Leave element); c-->|No |d(Transform); ``` #method version Function returning version information **Returns** * {string} A string containing the version info