Update README.md

Added some info about the parser available in the api.
This commit is contained in:
Knut Sveidqvist 2014-12-03 20:03:15 +01:00
parent dd26960852
commit 53e3b431d5
1 changed files with 10 additions and 0 deletions

View File

@ -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!