最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

mermaid - Is it possible to add lines between these mermaidjs blocks without messing the positioning up? - Stack Overflow

programmeradmin0浏览0评论

This is my mermaidjs diagram:

I'd like to add lines going Switch1-Switch2 and Switch2-Switch3. However, doing so throws the alignment off completely. Is there any way to accomplish this using mermaidjs?

graph TD
    subgraph s
        Switch1["Switch 1<br>Core Switch"]
        Switch2["Switch 2<br>Office VLAN"]
        Switch3["Switch 3<br>IoT Devices"]
    end

    subgraph sa
        Switch1 --> PC1["PC 1<br>192.168.1.101<br>Workstation"]
        Switch1 --> PC2["PC 2<br>192.168.1.102<br>Workstation"]
        Switch1 --> Server1["Server 1<br>192.168.1.200<br>File Server"]
    end

    subgraph sb
        Switch2 --> PC3["PC 3<br>192.168.1.103<br>Workstation"]
        Switch2 --> PC4["PC 4<br>192.168.1.104<br>Workstation"]
        Switch2 --> Printer1["Printer 1<br>192.168.1.150<br>Network Printer"]
        Switch2 --> IoT1["IoT Device 1<br>192.168.1.201<br>Smart Sensor"]
    end

    subgraph sc
        Switch3 --> PC5["PC 5<br>192.168.1.105<br>Workstation"]
        Switch3 --> PC6["PC 6<br>192.168.1.106<br>Workstation"]
        Switch3 --> Server2["Server 2<br>192.168.1.201<br>Web Server"]
        Switch3 --> IoT2["IoT Device 2<br>192.168.1.202<br>Security Camera"]
    end

    linkStyle default marker-end:none;

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论