flowchart LR
subgraph Apa["Apa"]
    A["Start"]
    B["This is B"]
end
    A --> B & C["C"]
    Apa --> C
      
flowchart LR
subgraph Apa["Apa"]
    B["This is B"]
    A["Start"]
end
    A --> B & C["C"]
    Apa --> C
      
flowchart RL
subgraph Apa["Apa"]
  subgraph Gorilla
    A["Start"]
    B["This is B"]
  end
end
    A --> B & C["C"]
    Gorilla --> C
      
flowchart LR
subgraph Apa["Apa"]
  subgraph Gorilla
    A["Start"]
    B["This is B"]
  end
end
    A --> B & C["C"]
    Apa --> C
      
flowchart LR
subgraph Apa["Apa"]
  subgraph Gorilla
    B["This is B"]
    A["Start"]
  end
end
Apa --> C
A --> B & C["C"]
      
stateDiagram
direction LR
      state Gorilla0 {
        state Apa0 {
          A0 --> B0
        }

      }
      Apa0 --> C0
      A0 --> C0
      
flowchart LR
    subgraph Gorilla
      subgraph Apa
        A[A] --- B
      end
    end
    Apa --- C
    A --x C

    
---
config:
  look: neo
  theme: neo
  layout: elk
  elk.mergeEdges: true
  themeVariables: {}
---
%% 'elk.stress',
%% 'elk.force'
%%'elk.mrtree'
%% 'elk.sporeOverlap
stateDiagram
  direction TB
  A --> B
  A --> C
  A --> D
  A --> E
  A --> F
  state F {
    Another
  }
  Another --> A


      
flowchart LR
 subgraph Apa["Apa"]
        A["Start"]
        B["This is B"]
  end
    A --> B & C["C"]
    Apa --> C

      
      %%{init: {"layout": "dagre", "mergeEdges": false} }%%
flowchart LR
      A ==> B(This is B)
    A[Start] --> B(Is it?)
    B -- Yes --> C[OK]
    C --> D[Rethink]
    D --> B
    B -. No ...-> E[End]


      
      %%{init: {"layout": "elk", "mergeEdges": true} }%%
flowchart
      A --> B(This is B)
      
      %%{init: {"layout": "elk", "mergeEdges": false, "elk.nodePlacement.strategy": "SIMPLE"} }%%
      stateDiagram
    state if_state <<choice>>
    [*] --> IsPositive
    IsPositive --> if_state
    if_state --> False: if n < 0
    if_state --> True : if n >= 0
      
      %%{init: {"layout": "elk", "mergeEdges": false, "elk.nodePlacement.strategy": "SIMPLE"} }%%
      stateDiagram
    state if_state <<choice>>
    [*] --> IsPositive
    IsPositive --> if_state
    if_state --> False: if n < 0
    if_state --> True : if n >= 0
      
      %%{init: {"layout": "dagre", "mergeEdges": true} }%%
stateDiagram
  direction TB
  State T1 {
    T12--> T11
  }
  T1 --> T2
  T11 --> T2
      
      %%{init: {"layout": "dagre", "mergeEdges": true} }%%
stateDiagram
State T1 {
    T21
    --
    T22
    }
      
      %%{init: {"layouts": "elk2", "mergeEdges": true} }%%
      stateDiagram
      State S1 {
    direction TB
    S11
  }
  S1 --> S2
      
      %%{init: {"layout": "elk", "mergeEdges": true} }%%
stateDiagram
State T1 {
    T21
    --
    T22
    }
      
      %%{init: {"layout": "elk", "mergeEdges": true} }%%
stateDiagram
  [*] --> T1
  T1 --> T2
  T1 --> T3
  T1 --> T4
      
      %%{init: {"layout": "elk"} }%%
stateDiagram
  [*] --> T1
  T1 --> T2
  T2 --> T3
  T3 --> T1
  T1 --> T3
      
stateDiagram
  State1: The state with a note
  note right of State1
      Important information! You can write
      notes.
  end note
      
stateDiagram-v2
    direction LR
    [*] --> Active

    state Active {
      direction BT
        [*] --> Inner
        Inner --> NumLockOn : EvNumLockPressed
    }
    %% Outer --> Inner