Skip to content

Graphviz has default graph ID #90

@clemens-tolboom

Description

@clemens-tolboom

When generating a Graph its name always is 'G' (in svg output it's the title sometimes showed as a web browser tooltip)

The code https://github.com/clue/graph/blob/master/lib/Fhaculty/Graph/GraphViz.php#L285

        $script = ($directed ? 'di':'') . 'graph G {' . self::EOL;

could render a proper ID as defined in http://www.graphviz.org/content/dot-language

Trouble is where to set its name as this has no relation to the graph layout.

Ie adding a label layout attribute like

        $script .= ' label = "Awesome graph"' . self::EOL;

adds a label to the output.

Can we do better?

Relates to #84 + #40

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions