Search code examples
plantuml

How do I adjust the syntax of plantUML so that the lines on this graph do not coincide?


This my planUML code.

@startuml
node PortalWeb [
Portal WEB
]

card APIGatewayCluster{
node Gateway1
node Gateway2
node Gateway3
}

card NacosCluster {
    node Nacos1
    node Nacos2
    node Nacos3
}


card DOUC {
    node DOUCNODE {
        port 18206
        port 18241
        port 18201
        port 18204
        agent PortalServer
        agent DOUCApi
        agent GatewayServer
        agent GatewayServerApi
    }
    18206 -> PortalServer
    18241 -> DOUCApi
    18201 -> GatewayServer
    18204 -> GatewayServerApi

}


card DOLA{
    node dolaServer
}

card DOOP{
    node doopCore
}

card RedisCluster{
    node redis1
    node redis2
    node redis3
}

card MysqlCluster{
    node mysql1
    node mysql2
    node mysql3
}

skinparam linetype ortho


PortalWeb -[dashed]-> NacosCluster : HTTP
PortalWeb -down-> APIGatewayCluster : HTTP
APIGatewayCluster -> DOUC : HTTP
APIGatewayCluster -> DOLA : HTTP
DOLA -> DOUC : HTTP
DOLA -> NacosCluster : HTTP
DOLA -> RedisCluster : HTTP
DOLA -> MysqlCluster : HTTP
DOLA -> DOOP : HTTP
DOLA -> DODP : HTTP
@enduml

This is the resulting picture.This drawing was automatically generated by PlantUML, but there were too many intersecting lines in the automatic generation, and the positions of each CARD were unreasonable, resulting in poor readability of this drawing. This is the resulting picture.

I tried using the keywords down, right, left, and up but it didn't seem to work as well as I hoped. Is there any way to adjust the relative positions of the card,can make the generated image more beautiful? please show me the PlantUml code, thanks


Solution

  • I went through the official PlantUML documentation, looked for the requirements, still didn't find a solution, and I suspect there isn't one. In the end, I found a software called "drawio" to draw the deployment diagram.