BT order reversed in single subgraph #1678
Labels
Graph: Flow
Internals: Parser
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Describe the bug
I'm building an open source tool that helps manage and visualize dependencies between microservices. I'm using a flowchart to represent the dependencies between services, and services are in systems. Each system is a subgraph. There's also a special subgraph called "root" that has root dependencies that must be deployed before any other service.
When I use
flowchart BT
to get the root dependencies at the top of the graph (all dependencies point "up" to root), everything works great, except the dependencies within the root subgraph go top-to-bottom.To Reproduce
Use this graph:
This is how it renders:
Expected behavior
I would expect
root-resources
to be on the top since this is aBT
chart. For example, I would expect it to look like this:Notably, a tweak to make each subgraph depend on the last dependency in the root subgraph (rather than depending on the root subgraph itself) fixes the problem. Here's the adjusted Mermaid:
Those last four lines are the ones that changed. Here's the result. It gets the dependency direction correct, but makes the root subgraph look awful because the box becomes very large. That's why I'd rather just link the subgraphs rather than items in each subgraph.
Thanks for the awesome library! Let me know if more info would be helpful. I used the Mermaid Live Editor to produce these diagrams, at version 8.8.0.
The text was updated successfully, but these errors were encountered: