Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setGraph(label) string like parameter ‘label’ make some misunderstand while it's just an accessor #119

Open
zcqno1 opened this issue Jun 6, 2020 · 0 comments

Comments

@zcqno1
Copy link

zcqno1 commented Jun 6, 2020

As the wiki demostrates, it seems to be suggested to set a label string for the graph instance by setGraph() . Actually, setGraph() and graph() are just a accessor to an internal private variable this._label, which can be any valid javascript expression. That's what the dagre uses to place the graph configurations like rankdir etc.

That's my confusion on setGraph(label) . Perhaps it could be better to describe it as some description for the graph, which could accept any valid javascript expression, maybe object the best.

BTW, thanks for making graphlib. It did a great job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant