Skip to content

proposal: cmd/modgraphviz: Colorize edges for more clear view on large graphs #73879

Closed as not planned
@abdoeid-eg

Description

@abdoeid-eg

Proposal Details

Problem

Description

When using modgraphiz on large codebases, it generates edges colored black which makes it very hard to differentiate between edges when they blend in one big edge like the following.

Image

Proposed solution

We can add a color property to the edge struct; we then populate this property with the same color for all nodes that depend on the current node.

Example

Dot Code

digraph gomodgraph {
    node [ shape=rectangle fontsize=12 ]
    A -> B [color="red"]
    A -> C [color="red"]
    A -> D [color="red"]
    B -> E [color="blue"]
    B -> F [color="blue"]
}

Output

Image

Is this an acceptable solution to start working on and open a PR with?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProposalToolProposalIssues describing a requested change to a Go tool or command-line program.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions