Giter Club home page Giter Club logo

Comments (2)

Yokozuna59 avatar Yokozuna59 commented on May 9, 2024

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.

Alexandre-SCHOEPP avatar Alexandre-SCHOEPP commented on May 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.