Comments (2)
Hi @Alexandre-SCHOEPP, thanks for reporting the issue.
But I wouldn’t really consider this an issue; subgraphs are just rectangles that wrap nodes according to their size; there is no point in creating empty rectangles with no nodes inside.
It’s kind of similar to the empty namespace in class
diagram, see #4625 (comment).
Unless you’re suggesting to make the behavior similar to the default renderer, degre
, to consider it a regular node:
flowchart
subgraph a
end
from mermaid.
Hi @Yokozuna59 !
there is no point in creating empty rectangles with no nodes inside.
I regularly use this functionality in mermaid with the default renderer as it allows for flowchart that evolve with development. For example, if I suspect that there will be subsystems in the future, I often leave an empty subgraph.
I also tend to make rather complex graphs, which, I understand, is a bit beyond the typical usecase for mermaid, but having empty subgraphs allows me to :
- use the live editor to make the general structure before focusing on details (and, since order of items has an impact on the rendering, i do need it to work with the final renderer for readability)
- remove subcomponents quickly to make a copy of particularly complex graphs that focus only on one aspect.
Unless you’re suggesting to make the behavior similar to the default renderer, degre, to consider it a regular node:
I think that this needs to either be properly documented (as I didn't find my answer in your documentation) with an error message saying that this is an intentional choice, or, as you've said, be brought to consistency with both renderer.
Thank you for the work you do on mermaid, I love that it does not have to be a static graph, and I think that this would help move the project in that direction.
from mermaid.
Related Issues (20)
- Allow user to disable setting of certain CSS styles
- YouTube `<iFrame>` doesn't render. HOT 2
- nested block diagram's dynamic width not worked as expected
- Misleading doc statement about state diagram?
- mermaid.ink server is down HOT 1
- Named composite example in State Diagram HOT 1
- Image not rendering in mermaid live HOT 1
- KaTeX does not render on GitHub HOT 3
- Tag a commit separate from the line defining the commit in gitGraph HOT 1
- Add support for nested namespaces
- The diagram renders only once. HOT 1
- How to put URL in timeline ?
- Bad Gantt Chart Will Cause UI to Hang
- Please add data attributes `data-from-id` and `data-to-id` to `g class='edgeLabel'` svg / make it clickable in flowchart HOT 1
- Parsing error when assigning a hex color value to the last attribute of a linkStyle
- Proyecto grabación de pantalla
- Allow linkStyle background-color attribute to override edgeLabel class background-color HOT 1
- Mermaid Chart - Code Editor Constantly Reduces Upwards HOT 3
- 'Graph' keyword in mindmap diagram breaks if elk renderer set for flowchart
- click/hover to Expand or collapse subgraphs/par
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mermaid.