mermaid
mermaid copied to clipboard
Feature request: Class diagram display regions
We use the mermaid class diagram to design database schemes since that's easy for developers and a visual representation can be auto generated through the live editor. But when the diagram becomes bigger (+30 classes), the visual representation becomes complicated because relations will cross other relations. This is because we can't choose which classes are visualized from left-to-right (because of the relationships). The result is a visual scheme in which many relationships cross each other and classes which belong together are scattered from left to right.
I would like to suggest a feature of something like 'display regions'.
- Display regions are squares which group classes together and are always displayed from left to right
- You can declare display regions in the mermaid file
- You can add classes (of a class diagram) to display regions
- (optional) you can set a background color for each display region
- (optional) give a title to a region, which is displayed at the top of the region
- Display regions can be applied to the class diagram and entity relationship diagrams
The alternative I try to do now, is to reorder the class relations, but at this point (+30 classes) it's pointless because some classes jump visually from left to right because of the may relationships between the classes.
Note: this feature request is similar to the existing subgraph functionality of a flowchart diagram.
Example of a scheme without display regions (as-is):
Example of a scheme with display regions (to-be):
(Note: the scheme should be cleaner and relationships should cross less)