Skip to content

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

@zcqno1

Description

@zcqno1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions