dagrejs/dagre

Improve documentation

RobinClowers opened this issue · 1 comments

I just started using Dagre, and while I really like it so far, I don't have a great understanding of many parts of the api. For example, the setGraph and setDefaultEdgeLabel functions seem to be for setting options on the graph and edges, but it would be great to have some api docs around these core functions.

Specifically related to the two functions I mentioned above, the wiki page has some comments about their use:

// Set an object for the graph label
g.setGraph({});

// Default to assigning a new object as a label for each new edge.
g.setDefaultEdgeLabel(function() { return {}; });

But looking at the code, these functions seem to be about more than just UI labels? Or does label have a specific meaning in graph domain?