mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
72.8k stars 6.65k forks source link

Nested subgraphs with nodes cut off parent subgraph labels #2345

Open rwbennett opened 3 years ago

rwbennett commented 3 years ago

Describe the bug When nesting subgraphs, the outer ones have their text cut off by the children they contain.

To Reproduce See the following markup:

 graph LR
   subgraph A
        subgraph B
            C
        end
   end

Expected behavior The label for "A" should not be obscured by B.

Screenshots image

MikePreston commented 3 years ago

bouncing this again. need a solution to this please!

ankorstore-haddowg commented 2 years ago

+1

asafm commented 2 years ago

I'm having the same issue. Can be seen clearly here: https://github.com/Opster/opensearch-k8s-operator/pull/50/files?short_path=69b1fce#diff-69b1fce49163aa67bbd8659f56a5ae9bb893bf732fbcc9971bdc1c5f24934b66

Screenshot: image

Markdown:

  flowchart LR
       subgraph opensearch-operator-ns [OpenSearch Operator Namespace]
         direction BT
         service-monitor-controller[[ServiceMonitor CRD]]-- references -->opensearch-controller[/OpenSearch Controller/]
       end 
       subgraph opensearch-clusters
         subgraph opensearch-cluster-1 [OpenSearch Cluster 1 Namespace]
           direction BT
           subgraph ss1 [OpenSearch Nodes StatefulSets]
             subgraph node11 [OpenSearch Node]
               plugin11[Prometheus Exporter Plugin]    
             end
             subgraph node12 [OpenSearch Node]
               plugin12[Prometheus Exporter Plugin]    
             end
           end
           service-monitor-ss-1[[ServiceMonitor CRD]]-- references -->plugin11
           service-monitor-ss-1-- references -->plugin12
         end
         subgraph opensearch-cluster-2 [OpenSearch Cluster 2 Namespace]
           direction BT
           subgraph ss2 [OpenSearch Nodes StatefulSets]
             subgraph node21 [OpenSearch Node]
               plugin21[Prometheus Exporter Plugin]    
             end
             subgraph node22 [OpenSearch Node]
               plugin22[Prometheus Exporter Plugin]    
             end
           end
           service-monitor-ss-2[[ServiceMonitor CRD]]-- references -->plugin21
           service-monitor-ss-2-- references -->plugin22
         end
       end
       subgraph prometheus-operator-ns [Prometheus Operator Namespace]
         direction TB
         prometheus-controller[/Prometheus Controller/]
         alert-manager[/Alert Manager/]
         grafana[/Grafana/]-- Query -->prometheus[/Prometheus/]

         prometheus-. Node Discovery .->service-monitor-ss-1
         prometheus-. Node Discovery .->service-monitor-ss-2
         prometheus-- Read Metrics -->plugin11
       end
       opensearch-controller-. Deploys .->service-monitor-ss-1
LuisBL commented 2 years ago

having the same Pb, it is a bug worth prioritizing

medliii commented 9 months ago

Hello. I guess it was fixed.

image

image

asafm commented 9 months ago

@medliii Thanks for letting us know! It is indeed fixed. This issue can be closed @rwbennett