From 53e3b431d5a941b0d54feacef3bc3ea18ab16141 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Wed, 3 Dec 2014 20:03:15 +0100 Subject: [PATCH] Update README.md Added some info about the parser available in the api. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 06e367794..061a08888 100644 --- a/README.md +++ b/README.md @@ -273,5 +273,15 @@ graph.getVertices(); graph.getEdges(); ``` +The parser is also exposed in the mermaid api by calling: +``` +var parser = mermaid.getParser(); +``` +Note that the parse needs a graph object to store the data as per: +``` +flow.parser.yy = graph; +``` + +Look at graphDb.js for more details on that object. # Credits Many thanks to the [d3](http://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!