MermaidJS VISUAL STUDY of the Day!

I see the issue — Mermaid v11 has stricter parsing rules, and the diagram contains some problematic syntax (like spaces in node IDs, special characters, and the way subgraphs are nested). Let me provide a fixed, working version with Mermaid v10 (more stable for complex flowcharts) and corrected syntax. ```html Roman Emperors: Complete Dynasty Flowchart | Mermaid Visual

🏛️ Roman Emperors: Dynasty & Succession Tree

From Augustus to Constantine XI (27 BC – AD 1453) · Interactive Mermaid Flowchart
📜 This visual diagram traces the imperial dynasties of Rome — from the founding of the Principate under Augustus, through the Julio-Claudian, Flavian, Nerva–Antonine, Severan, the Crisis of the Third Century, Tetrarchy, Constantinian, Theodosian, and the continued Eastern Roman (Byzantine) Empire all the way to the last Roman emperor in 1453. Scroll, zoom, and explore — fully interactive chart.
    flowchart TD
        Augustus("Augustus (27 BC–14 AD)
founder of the Empire") %% JULIO-CLAUDIAN subgraph JULIO["Julio-Claudian Dynasty"] Tiberius["Tiberius (adopted son)"] Caligula["Caligula (great-nephew)"] Claudius["Claudius (uncle of Caligula)"] Nero["Nero (adopted son)"] Augustus --> Tiberius Tiberius --> Caligula Caligula --> Claudius Claudius --> Nero end %% Collapse 69 AD Collapse69["Civil War & Collapse (AD 69)
Year of the Four Emperors"] Nero --> Collapse69 %% FLAVIAN subgraph FLAVIAN["Flavian Dynasty"] Vespasian["Vespasian (69–79)
military founder"] Titus["Titus (son)"] Domitian["Domitian (son)"] Vespasian --> Titus Vespasian --> Domitian end Collapse69 --> Vespasian %% NERVA-ANTONINE subgraph NERVA["Nerva–Antonine Dynasty (Adoptive Emperors)"] Nerva["Nerva (96–98)"] Trajan["Trajan (adopted)"] Hadrian["Hadrian (adopted)"] Antoninus["Antoninus Pius (adopted)"] MarcusAurelius["Marcus Aurelius (adopted)"] Commodus["Commodus (biological son)"] Nerva --> Trajan Trajan --> Hadrian Hadrian --> Antoninus Antoninus --> MarcusAurelius MarcusAurelius --> Commodus end Domitian --> Nerva %% SEVERAN DYNASTY subgraph SEVERAN["Severan Dynasty"] Septimius["Septimius Severus (193–211)"] Caracalla["Caracalla (son)"] Geta["Geta (son, co-emperor)
killed by Caracalla"] Elagabalus["Elagabalus (relative via female line)"] SeverusAlexander["Severus Alexander (cousin line)"] Septimius --> Caracalla Septimius --> Geta Septimius -.-> Elagabalus Elagabalus --> SeverusAlexander end Commodus --> Septimius %% CRISIS Crisis["Crisis of the Third Century (235–284)
No stable dynasties – army coups"] SeverusAlexander --> Crisis %% TETRARCHY subgraph TET["Tetrarchy (Diocletianic System)"] Diocletian["Diocletian (284–305)
creator of Tetrarchy"] Maximian["Maximian"] Galerius["Galerius"] ConstantiusChlorus["Constantius Chlorus"] Diocletian --> Maximian Diocletian --> Galerius Diocletian --> ConstantiusChlorus end Crisis --> Diocletian %% CONSTANTINIAN subgraph CONST["Constantinian Dynasty"] ConstantineGreat["Constantine the Great (306–337)
reunites empire"] ConstantineII["Constantine II (son)"] ConstantiusII["Constantius II (son)"] Constans["Constans (son)"] Julian["Julian the Apostate (cousin branch)"] ConstantiusChlorus --> ConstantineGreat ConstantineGreat --> ConstantineII ConstantineGreat --> ConstantiusII ConstantineGreat --> Constans ConstantiusII --> Julian end %% THEODOSIAN subgraph THEODOSIAN["Theodosian Dynasty & Empire Split"] TheodosiusI["Theodosius I (379–395)
last ruler of united empire"] Arcadius["Arcadius (Eastern Roman Empire)"] Honorius["Honorius (Western Roman Empire)"] ValentinianIII["Valentinian III (Western, by marriage)"] TheodosiusI --> Arcadius TheodosiusI --> Honorius Honorius --> ValentinianIII end Julian --> TheodosiusI %% WESTERN END WesternEnd["Western Roman Empire ends 476 AD
Romulus Augustulus deposed"] ValentinianIII --> WesternEnd %% BYZANTINE SECTION subgraph BYZ["Eastern Roman (Byzantine) Empire – continues until 1453"] subgraph JUST["Justinian Dynasty"] JustinI["Justin I (518–527)"] JustinianI["Justinian I the Great"] JustinII["Justin II (nephew)"] JustinI --> JustinianI JustinianI --> JustinII end subgraph HERAC["Heraclian Dynasty"] Heraclius["Heraclius (610–641)"] ConstantineIII["Constantine III"] Heraclonas["Heraclonas"] Heraclius --> ConstantineIII Heraclius --> Heraclonas end subgraph MAC["Macedonian Dynasty (Golden Age)"] BasilI["Basil I (867–886)"] LeoVI["Leo VI the Wise"] ConstantineVII["Constantine VII"] BasilII["Basil II 'Bulgar Slayer' (976–1025)"] BasilI --> LeoVI LeoVI --> ConstantineVII ConstantineVII --> BasilII end subgraph KOMN["Komnenian Dynasty"] AlexiosI["Alexios I Komnenos (1081–1118)"] JohnII["John II Komnenos"] ManuelI["Manuel I Komnenos"] AlexiosI --> JohnII JohnII --> ManuelI end subgraph PALEO["Palaiologan Dynasty – Final Roman Emperors"] MichaelVIII["Michael VIII Palaiologos (1261)"] AndronikosII["Andronikos II"] AndronikosIII["Andronikos III"] JohnV["John V Palaiologos"] ConstantineXI["Constantine XI Palaiologos
last Roman emperor, died 1453"] MichaelVIII --> AndronikosII AndronikosII --> AndronikosIII AndronikosIII --> JohnV JohnV --> ConstantineXI end end %% Connect Eastern line from Arcadius Arcadius --> JustinI Arcadius --> Heraclius Arcadius --> BasilI Arcadius --> AlexiosI Arcadius --> MichaelVIII %% Styling classDef founder fill:#d4af37,stroke:#8b5a2b,stroke-width:2px,color:#2c2c2c,font-weight:bold classDef dynasty fill:#e8dccc,stroke:#b78f50,stroke-width:1.5px classDef crisis fill:#d9c2a7,stroke:#a5713c,stroke-dasharray:4 2 classDef byz fill:#c3d7b5,stroke:#5b7a3a,stroke-width:1.5px classDef westend fill:#c2b2a3,stroke:#7a5a3a class Augustus,ConstantineGreat,TheodosiusI,JustinianI,BasilII,ConstantineXI founder class JULIO,FLAVIAN,NERVA,SEVERAN,CONST,THEODOSIAN dynasty class Collapse69,Crisis,WesternEnd crisis class BYZ,JUST,HERAC,MAC,KOMN,PALEO byz
🏆 Founding / Great Emperors
🏛️ Major Dynasties (West)
⚡ Crisis / Collapse Periods
🌿 Byzantine (Eastern) Dynasties
🏺 End of Western Empire
```


SOURCE CODE

I see the issue — Mermaid v11 has stricter parsing rules, and the diagram contains some problematic syntax (like spaces in node IDs, special characters, and the way subgraphs are nested). Let me provide a fixed, working version with Mermaid v10 (more stable for complex flowcharts) and corrected syntax.

```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Roman Emperors: Complete Dynasty Flowchart | Mermaid Visual</title>
<!-- Using Mermaid v10 (stable, well-tested for complex flowcharts) -->
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.9.0/dist/mermaid.min.js"></script>
<style>
  body {
    background: #f4ede4;
    margin: 0;
    padding: 20px;
    font-family: 'Georgia', 'Times New Roman', Times, serif;
  }
  .post-body {
    max-width: 1300px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 25px 40px 25px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  }
  h1 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 0.2rem;
    border-left: 6px solid #b27c40;
    padding-left: 22px;
    color: #2c2822;
    font-weight: normal;
  }
  .sub {
    color: #6f5a44;
    margin-left: 28px;
    margin-bottom: 28px;
    font-style: italic;
    border-bottom: 1px solid #e1d3c4;
    padding-bottom: 8px;
    display: inline-block;
  }
  .intro-text {
    background: #fdf7ef;
    padding: 12px 20px;
    border-radius: 16px;
    margin: 20px 0 25px 0;
    border-left: 4px solid #b27c40;
    font-size: 0.98rem;
  }
  .mermaid-wrapper {
    background: #fefcf8;
    padding: 20px 10px 10px 10px;
    border-radius: 28px;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow-x: auto;
  }
  .mermaid {
    display: flex;
    justify-content: center;
    min-height: 600px;
  }
  .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 30px;
    padding-top: 12px;
    border-top: 2px solid #e8dfd3;
    justify-content: center;
    font-size: 0.85rem;
  }
  .legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .legend-color {
    width: 22px;
    height: 22px;
    border-radius: 30px;
    display: inline-block;
  }
  .footer-note {
    margin-top: 32px;
    background: #f2ede5;
    padding: 14px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-align: center;
    color: #4e3e2e;
  }
  @media (max-width: 700px) {
    .post-body { padding: 20px 16px; }
    h1 { font-size: 1.7rem; }
    .mermaid-wrapper { padding: 12px 4px; }
  }
</style>
</head>
<body>
<div class="post-body">
  <h1>🏛️ Roman Emperors: Dynasty & Succession Tree</h1>
  <div class="sub">From Augustus to Constantine XI (27 BC – AD 1453) · Interactive Mermaid Flowchart</div>
  
  <div class="intro-text">
    📜 This visual diagram traces the imperial dynasties of Rome — from the founding of the Principate under Augustus, through the 
    Julio-Claudian, Flavian, Nerva–Antonine, Severan, the Crisis of the Third Century, Tetrarchy, Constantinian, Theodosian, 
    and the continued Eastern Roman (Byzantine) Empire all the way to the last Roman emperor in 1453.
    <strong>Scroll, zoom, and explore — fully interactive chart.</strong>
  </div>

  <!-- MERMAID DIAGRAM - fixed syntax, v10 compatible -->
  <div class="mermaid-wrapper">
    <pre class="mermaid">
    flowchart TD
        Augustus("Augustus (27 BC–14 AD)<br>founder of the Empire")

        %% JULIO-CLAUDIAN
        subgraph JULIO["Julio-Claudian Dynasty"]
            Tiberius["Tiberius (adopted son)"]
            Caligula["Caligula (great-nephew)"]
            Claudius["Claudius (uncle of Caligula)"]
            Nero["Nero (adopted son)"]
            Augustus --> Tiberius
            Tiberius --> Caligula
            Caligula --> Claudius
            Claudius --> Nero
        end

        %% Collapse 69 AD
        Collapse69["Civil War & Collapse (AD 69)<br>Year of the Four Emperors"]
        Nero --> Collapse69

        %% FLAVIAN
        subgraph FLAVIAN["Flavian Dynasty"]
            Vespasian["Vespasian (69–79)<br>military founder"]
            Titus["Titus (son)"]
            Domitian["Domitian (son)"]
            Vespasian --> Titus
            Vespasian --> Domitian
        end
        Collapse69 --> Vespasian

        %% NERVA-ANTONINE
        subgraph NERVA["Nerva–Antonine Dynasty (Adoptive Emperors)"]
            Nerva["Nerva (96–98)"]
            Trajan["Trajan (adopted)"]
            Hadrian["Hadrian (adopted)"]
            Antoninus["Antoninus Pius (adopted)"]
            MarcusAurelius["Marcus Aurelius (adopted)"]
            Commodus["Commodus (biological son)"]
            Nerva --> Trajan
            Trajan --> Hadrian
            Hadrian --> Antoninus
            Antoninus --> MarcusAurelius
            MarcusAurelius --> Commodus
        end
        Domitian --> Nerva

        %% SEVERAN DYNASTY
        subgraph SEVERAN["Severan Dynasty"]
            Septimius["Septimius Severus (193–211)"]
            Caracalla["Caracalla (son)"]
            Geta["Geta (son, co-emperor)<br>killed by Caracalla"]
            Elagabalus["Elagabalus (relative via female line)"]
            SeverusAlexander["Severus Alexander (cousin line)"]
            Septimius --> Caracalla
            Septimius --> Geta
            Septimius -.-> Elagabalus
            Elagabalus --> SeverusAlexander
        end
        Commodus --> Septimius

        %% CRISIS
        Crisis["Crisis of the Third Century (235–284)<br>No stable dynasties – army coups"]
        SeverusAlexander --> Crisis

        %% TETRARCHY
        subgraph TET["Tetrarchy (Diocletianic System)"]
            Diocletian["Diocletian (284–305)<br>creator of Tetrarchy"]
            Maximian["Maximian"]
            Galerius["Galerius"]
            ConstantiusChlorus["Constantius Chlorus"]
            Diocletian --> Maximian
            Diocletian --> Galerius
            Diocletian --> ConstantiusChlorus
        end
        Crisis --> Diocletian

        %% CONSTANTINIAN
        subgraph CONST["Constantinian Dynasty"]
            ConstantineGreat["Constantine the Great (306–337)<br>reunites empire"]
            ConstantineII["Constantine II (son)"]
            ConstantiusII["Constantius II (son)"]
            Constans["Constans (son)"]
            Julian["Julian the Apostate (cousin branch)"]
            ConstantiusChlorus --> ConstantineGreat
            ConstantineGreat --> ConstantineII
            ConstantineGreat --> ConstantiusII
            ConstantineGreat --> Constans
            ConstantiusII --> Julian
        end

        %% THEODOSIAN
        subgraph THEODOSIAN["Theodosian Dynasty & Empire Split"]
            TheodosiusI["Theodosius I (379–395)<br>last ruler of united empire"]
            Arcadius["Arcadius (Eastern Roman Empire)"]
            Honorius["Honorius (Western Roman Empire)"]
            ValentinianIII["Valentinian III (Western, by marriage)"]
            TheodosiusI --> Arcadius
            TheodosiusI --> Honorius
            Honorius --> ValentinianIII
        end
        Julian --> TheodosiusI

        %% WESTERN END
        WesternEnd["Western Roman Empire ends 476 AD<br>Romulus Augustulus deposed"]
        ValentinianIII --> WesternEnd

        %% BYZANTINE SECTION
        subgraph BYZ["Eastern Roman (Byzantine) Empire – continues until 1453"]
            
            subgraph JUST["Justinian Dynasty"]
                JustinI["Justin I (518–527)"]
                JustinianI["Justinian I the Great"]
                JustinII["Justin II (nephew)"]
                JustinI --> JustinianI
                JustinianI --> JustinII
            end

            subgraph HERAC["Heraclian Dynasty"]
                Heraclius["Heraclius (610–641)"]
                ConstantineIII["Constantine III"]
                Heraclonas["Heraclonas"]
                Heraclius --> ConstantineIII
                Heraclius --> Heraclonas
            end

            subgraph MAC["Macedonian Dynasty (Golden Age)"]
                BasilI["Basil I (867–886)"]
                LeoVI["Leo VI the Wise"]
                ConstantineVII["Constantine VII"]
                BasilII["Basil II 'Bulgar Slayer' (976–1025)"]
                BasilI --> LeoVI
                LeoVI --> ConstantineVII
                ConstantineVII --> BasilII
            end

            subgraph KOMN["Komnenian Dynasty"]
                AlexiosI["Alexios I Komnenos (1081–1118)"]
                JohnII["John II Komnenos"]
                ManuelI["Manuel I Komnenos"]
                AlexiosI --> JohnII
                JohnII --> ManuelI
            end

            subgraph PALEO["Palaiologan Dynasty – Final Roman Emperors"]
                MichaelVIII["Michael VIII Palaiologos (1261)"]
                AndronikosII["Andronikos II"]
                AndronikosIII["Andronikos III"]
                JohnV["John V Palaiologos"]
                ConstantineXI["Constantine XI Palaiologos<br>last Roman emperor, died 1453"]
                MichaelVIII --> AndronikosII
                AndronikosII --> AndronikosIII
                AndronikosIII --> JohnV
                JohnV --> ConstantineXI
            end
        end

        %% Connect Eastern line from Arcadius
        Arcadius --> JustinI
        Arcadius --> Heraclius
        Arcadius --> BasilI
        Arcadius --> AlexiosI
        Arcadius --> MichaelVIII

        %% Styling
        classDef founder fill:#d4af37,stroke:#8b5a2b,stroke-width:2px,color:#2c2c2c,font-weight:bold
        classDef dynasty fill:#e8dccc,stroke:#b78f50,stroke-width:1.5px
        classDef crisis fill:#d9c2a7,stroke:#a5713c,stroke-dasharray:4 2
        classDef byz fill:#c3d7b5,stroke:#5b7a3a,stroke-width:1.5px
        classDef westend fill:#c2b2a3,stroke:#7a5a3a

        class Augustus,ConstantineGreat,TheodosiusI,JustinianI,BasilII,ConstantineXI founder
        class JULIO,FLAVIAN,NERVA,SEVERAN,CONST,THEODOSIAN dynasty
        class Collapse69,Crisis,WesternEnd crisis
        class BYZ,JUST,HERAC,MAC,KOMN,PALEO byz
    </pre>
  </div>

  <div class="legend">
    <span><div class="legend-color" style="background:#d4af37; border:1px solid #8b5a2b;"></div> 🏆 Founding / Great Emperors</span>
    <span><div class="legend-color" style="background:#e8dccc;"></div> 🏛️ Major Dynasties (West)</span>
    <span><div class="legend-color" style="background:#d9c2a7; border:dashed 1px #a5713c;"></div> ⚡ Crisis / Collapse Periods</span>
    <span><div class="legend-color" style="background:#c3d7b5;"></div> 🌿 Byzantine (Eastern) Dynasties</span>
    <span><div class="legend-color" style="background:#c2b2a3;"></div> 🏺 End of Western Empire</span>
  </div>

  <div class="footer-note">
    <strong>📌 About this visualization:</strong> Built with Mermaid.js v10 · Dynamic family tree & imperial succession flows.<br>
    The Eastern Roman (Byzantine) line descends from Arcadius and continues uninterrupted for ~1,058 years after the Western collapse.<br>
    ✅ Interactive: Pan, zoom, and expand nodes. All major emperors and dynastic connections included.
  </div>
</div>

<script>
  // Initialize Mermaid with safe settings for v10
  mermaid.initialize({
    startOnLoad: true,
    theme: 'base',
    themeVariables: {
      'background': '#ffffff',
      'primaryColor': '#f2e8da',
      'primaryBorderColor': '#b27c40',
      'primaryTextColor': '#2c2822',
      'lineColor': '#9c8264',
      'secondaryColor': '#fdf7ef',
      'tertiaryColor': '#e9e0d3',
      'fontFamily': 'Georgia, Times New Roman, serif',
      'fontSize': '14px',
    },
    flowchart: {
      useMaxWidth: true,
      htmlLabels: true,
      curve: 'basis',
      padding: 15,
      nodeSpacing: 50,
      rankSpacing: 50
    },
    securityLevel: 'loose',
  });
  
  // Force re-run after page fully loads
  window.addEventListener('load', function() {
    if (typeof mermaid !== 'undefined') {
      mermaid.contentLoaded();
    }
  });
</script>
</body>
</html>
```

Comments