Skip to content

Commit 8e17492

Browse files
committed
add docs and changeset
1 parent 548cead commit 8e17492

4 files changed

Lines changed: 27 additions & 14 deletions

File tree

.changeset/eager-cobras-slide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'mermaid': minor
3+
---
4+
5+
feat: add datastore shape for flowchart
6+
7+
In Data flow diagrams, a datastore/warehouse/file/database is used to represent data persistence. It is denoted by a rectangle with top and bottom border. This change adds that as a shape in flowcharts.

demos/dataflowchart.html

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,7 @@ <h1>Data Flow Diagram demos</h1>
1818
flowchart LR
1919
accTitle: A simple linear flowchart.
2020
accDescr: A Database has input to a circle System has output to a square Customer.
21-
DataStore[|borders:tb|Database] -->|input| Process((System)) -->|output| Entity[Customer];
22-
</pre>
23-
24-
<hr />
25-
26-
<h2>Borders Example</h2>
27-
<pre class="mermaid">
28-
flowchart TD
29-
allSides[ stroke all sides ];
30-
allSides2[|borders:ltrb| stroke all sides ];
31-
rbSides[|borders:rb| stroke right and bottom sides ];
32-
ltSides[|borders:lt| stroke left and top sides ];
33-
lrSides[|borders:lr| stroke left and right sides ];
34-
noSide[|borders:no| stroke no side ];
21+
DataStore@{shape: datastore, label: "Datastore"} -->|input| Process((System)) -->|output| Entity[Customer];
3522
</pre>
3623

3724
<script type="module">

docs/syntax/flowchart.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,18 @@ flowchart TD
527527
A@{ shape: lean-l, label: "Output/Input" }
528528
```
529529

530+
### Datastore (Top and bottom border)
531+
532+
```mermaid-example
533+
flowchart TD
534+
A@{ shape: datastore, label: "Datastore" }
535+
```
536+
537+
```mermaid
538+
flowchart TD
539+
A@{ shape: datastore, label: "Datastore" }
540+
```
541+
530542
### Priority Action (Trapezoid Base Bottom)
531543

532544
```mermaid-example

packages/mermaid/src/docs/syntax/flowchart.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ flowchart TD
307307
A@{ shape: lean-l, label: "Output/Input" }
308308
```
309309

310+
### Datastore (Top and bottom border)
311+
312+
```mermaid-example
313+
flowchart TD
314+
A@{ shape: datastore, label: "Datastore" }
315+
```
316+
310317
### Priority Action (Trapezoid Base Bottom)
311318

312319
```mermaid-example

0 commit comments

Comments
 (0)