# Sequence Diagram A tool for creating sequence diagrams from a Domain-Specific Language. [See it in action!](https://davidje13.github.io/SequenceDiagram/) This project includes a web page for editing the diagrams, but the core logic is available as a component which can be [included in other projects](https://davidje13.github.io/SequenceDiagram/library.htm). ## Examples ### Simple Usage Simple Usage preview ``` title Labyrinth Bowie -> Goblin: You remind me of the babe Goblin -> Bowie: What babe? Bowie -> Goblin: The babe with the power Goblin -> Bowie: What power? note right of Bowie, Goblin: Most people get muddled here! Bowie -> Goblin: "The power of voodoo" Goblin -> Bowie: "Who-do?" Bowie -> Goblin: You do! Goblin -> Bowie: Do what? Bowie -> Goblin: Remind me of the babe! Bowie -> Audience: Sings terminators box ``` ### Connection Types Connection Types preview ``` title Connection Types begin Foo, Bar, Baz Foo -> Bar: Simple arrow Bar --> Baz: Dashed arrow Foo <- Bar: Reversed arrow Bar <-- Baz: Reversed & dashed Foo <-> Bar: Double arrow Bar <--> Baz: Double dashed arrow # An arrow with no label: Foo -> Bar Bar ->> Baz: Different arrow Foo <<--> Bar: Mix of arrows Bar -> Bar: Bar talks to itself Foo -> +Bar: Foo asks Bar -Bar --> Foo: and Bar replies Bar -x Baz: Lost message # Arrows leaving on the left and right of the diagram [ -> Foo: From the left [ <- Foo: To the left Foo -> ]: To the right Foo <- ]: From the right [ ~> ]: Wavy left to right! # (etc.) ``` ### Notes & State Notes and State preview ``` title Note Placements note over Foo: Foo says something note left of Foo: Stuff note right of Bar: More stuff note over Foo, Bar: "Foo and Bar on multiple lines" note between Foo, Bar: Link text right: "Comments\nOver here!" state over Foo: Foo is ponderous ``` ### Logic Logic preview ``` title At the Bank begin Person, ATM, Bank Person -> ATM: Request money ATM -> Bank: Check funds if fraud detected Bank -> Police: "Get 'em!" Police -> Person: "You're nicked" end Police else if sufficient funds ATM -> Bank: Withdraw funds repeat until "all requested money has been handed over" ATM -> Person: Dispense note end else ATM -> Person: Error end ``` ### Label Templates Label Templates preview ``` autolabel "[]