Published
Edited
Sep 1, 2020
Fork of Mermaid JS
1 fork
Importers
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
mermaidJs = require('mermaid@8.7/dist/mermaid.min.js');
Insert cell
Insert cell
viewof mermaidContainer = html`<div id="mermaid" />`
Insert cell
Insert cell
mermaid = function (...values) {
const div = (viewof mermaidContainer); //document.getElementById('mermaid');
if (!div) {
throw 'Cannot find div with id "mermaid"';
}
const src = String.raw(...values).trim();
const id = "mmd" + Math.round(Math.random() * 10000);
div.append(html`<div id="${id}" />`);
try {
const result = mermaidJs.render(id, src, undefined);
return svg([result]);
} catch (ex) {
console.error(ex);
throw ex;
}
}
Insert cell
Insert cell
Insert cell
mermaid`
graph TD
A[IOT Sensor] -->|arrow-plasma-sensor-stream| B(Edge Compute)
B --> C{cloudflare-platform-stream-aggregator}
C -->|arrow-plasma-tensor-stream| D[Laptop]
C -->|arrow-plasma-tensor-stream| E[Edge GPU]
E -->|ros-stream|F
C -->|ros-stream| F[fa:fa-car ros-swarm-controlller]
F -->|Program| O[FPGA]
F -->|usb-tty| P[ARM Cortex]
F -->|usb-tty| Q[Odrive ATM32]
C -->|arrowjs-stream| J
I --> H(web3-erasure-protocol)
G{web3-World-Lines-IOT-Data-Fabric} -->|semantic classification tensor | J{k8s-kfserving-shiva-cv}
J -->|federated dataset| I
J --> K{opencv-task}
J -->|gibson/alfred-metadata| L(airsim-cv-training-pipeline)
J -->|gibson/alfred-metadata| S(sstk-babylonjs-annotation-pipeline)
L --> R{ray-training-agent<br>generative-differential-privacy-layers<br>pytorch-captum-insights-attributions}
R --> M(openai-gym-benchmarker)
M --> I
I{web3-erasure-dataset-governance}-->|pl-ipld-training-dataset-metadata| G
K --> N(StanfordVL-taskonomy-hierarchy)
T(Key:)
Z[Hardware] -->|CloudNative Event| y{Project}
y --> X(Integration)
`
Insert cell
Insert cell
mermaid`
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
`
Insert cell
Insert cell
mermaid`
classDiagram
Class01 <|-- AveryLongClass : Cool
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
`
Insert cell
Insert cell
mermaid`
stateDiagram-v2
[*] --> Still
Still --> [*]

Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
`
Insert cell
Insert cell
mermaid`
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
`
Insert cell
Insert cell
mermaid`
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me
`
Insert cell
Insert cell
mermaid`
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10

section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
`
Insert cell
Insert cell
mermaid`
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
`
Insert cell
Insert cell
mermaid`
gitGraph:
options
{
"nodeSpacing": 150,
"nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch
`
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more