Giter VIP home page Giter VIP logo

Comments (2)

errolsancaktar avatar errolsancaktar commented on June 6, 2024

something like this:
dsfg

from diagrams.

Anddd7 avatar Anddd7 commented on June 6, 2024

You can add some 'hidden points & lines' to reorder the nodes.

  • by default, direction="TB" will list your nodes from left2right, because there is no any relations
  • then, if you NAT_QA -- NAT_DEV, TB layout will move dev to next line

So, if you have enough patient, you can create additional Node(color=transparent), Edge(color=transparent), Cluster(color=transparent) to order nodes.

e.g. to make 3 clusters vertical, I create 3 hidden points in each of them, and connect with hidden edge.

with Cluster("identity"):
    S3()
    Terraform()
    Cloudtrail()
    p1 = HiddenPoint()
with Cluster("identity2"):
    S3()
    Terraform()
    Cloudtrail()
    p2 = HiddenPoint()
with Cluster("identity3"):
    S3()
    Terraform()
    Cloudtrail()
    p3 = HiddenPoint()

# p1 - p2 - p3
peercluster(p1, p2, p3, penwidth="0", minlen="1")  # util method in my repo

Sample: https://github.com/Anddd7/diagrams-patterns/blob/main/poc_aws_complex.py#L94
Sample


Another way is using neato as the layout engine, then create node with x,y ... if you really want to control the layout

Sample: https://github.com/Anddd7/diagrams-patterns/blob/main/poc_neato_overlap.py
Sample

from diagrams.

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.