Skip to content

Improve Graph Layout (Avoid Overlap of Nodes/Labels) #4

Description

@Z-xus

Environment:

  • React + TypeScript
  • PNPM-managed project
  • DFA visualization component

Description:
The current DFA graph visualization can have overlapping nodes and labels, reducing readability for larger or complex DFAs. The layout algorithm needs improvement to automatically space nodes and labels clearly.

Expected Behavior:

  • Nodes should be spaced to avoid overlap.
  • Labels should remain readable without colliding with edges or other nodes.
  • Layout should adapt dynamically to DFAs of different sizes.

Acceptance Criteria:

  • No overlapping nodes in typical DFA graphs.
  • Labels do not collide with edges or other nodes.
  • Graph layout remains readable regardless of DFA complexity.

Possible Solutions / Suggestions:

  • Use a graph layout library such as Dagre, Cytoscape, or react-flow’s built-in layout features.
  • Implement a force-directed or hierarchical layout algorithm.
  • Ensure compatibility with React + TypeScript and PNPM project setup.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions