An attribute statement, such as graph [label="Hello"];.

Implements

Constructors

Properties

Methods

Constructors

Properties

attrList: Record<string, string>

The list of attributes.

The type of attributes: graph, node, or edge.

Methods

  • Adds an attribute to the attribute list.

    Parameters

    • key: string

      The key of the attribute.

    • value: string

      The value of the attribute.

    Returns this

    This attribute statement, for chaining.

  • Adds multiple attributes to the attribute list.

    Parameters

    • attrs: Record<string, string>

      The attributes to add.

    Returns this

    This attribute statement, for chaining.

  • Converts the attribute statement to a dot string.

    Parameters

    • _: boolean

      Whether the graph is directed (unused).

    • indentation: number = 0

      The number of spaces to indent.

    Returns string

    The dot string of the attribute statement.