Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
Multiple directions in mermaid flowchart

The code snippet below creates a flowchart with the three boxes Data, Infrastructure & Modeling, ordered from left to right because of this line of mermaid code: flowchart LR. I would like the first two boxes, Data & Infrastructure to behave like that, but the box Modeling should go below Infrastructure. Is it possible in mermaid to allow for multiple directions?

The final flowchart should look roughly like that:

enter image description here

<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>
    mermaid.initialize({ startOnLoad: true });
</script>
<div class="mermaid">
  flowchart LR
  subgraph Data
    direction TB
    da1(Data1) --> api(APis)
    da2(Data2) --> api
    da3(Data3) --> api
  end
  subgraph Infrastructure
    direction TB
    pro(Processing) --> db[(Database)]
    db --> api2(API)
    api2 --> p(Python, R, ...)
    db --> app(Web App)
  end
  subgraph Modeling
    direction TB
    sta(Statistics)
    mal(Machine Learning)
    mem(Mechanistic Models)
  end
  api --> pro
  p --> Modeling
</div>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!