Skip to content

Commit b7692b0

Browse files
committed
Update diagram
1 parent 21059df commit b7692b0

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/examples/tutorials/event-driven-models.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ In this tutorial we're going to introduce an **event-driven model**, where data
1111
Here's the model that we're going to build. Given a stream of random numbers, we'll trigger `HighEvent` whenever the value is above `0.8` and `LowEvent` whenever the value is below `0.2`. This allows us to funnel data into different parts of the model: in this case we'll just save the latest high/low values to a file at each step. In the diagram the _dotted lines_ represent the flow of event data: `FindHighLowValues` will publish events, while `CollectHigh` and `CollectLow` will subscribe to receive high and low events respectively.
1212

1313
```mermaid
14-
graph LR;
15-
Random(random-generator)-->FindHighLowValues(find-high-low);
16-
FindHighLowValues(find-high-low)-.->HighEvent{{high-event}};
17-
FindHighLowValues(find-high-low)-.->LowEvent{{low-event}};
18-
HighEvent{{high-event}}-.->CollectHigh(collect-high);
19-
LowEvent{{low-event}}-.->CollectLow(collect-low);
20-
CollectHigh(collect-high)-->SaveHigh(save-high);
21-
CollectLow(collect-low)-->SaveLow(save-low);
14+
flowchart LR
15+
collect-high@{ shape: rounded, label: CollectHigh<br>**collect-high** } --> save-high@{ shape: rounded, label: FileWriter<br>**save-high** }
16+
collect-low@{ shape: rounded, label: CollectLow<br>**collect-low** } --> save-low@{ shape: rounded, label: FileWriter<br>**save-low** }
17+
random-generator@{ shape: rounded, label: Random<br>**random-generator** } --> find-high-low@{ shape: rounded, label: FindHighLowValues<br>**find-high-low** }
18+
low_event@{ shape: hex, label: LowEvent } -.-> collect-low@{ shape: rounded, label: CollectLow<br>**collect-low** }
19+
high_event@{ shape: hex, label: HighEvent } -.-> collect-high@{ shape: rounded, label: CollectHigh<br>**collect-high** }
20+
find-high-low@{ shape: rounded, label: FindHighLowValues<br>**find-high-low** } -.-> high_event@{ shape: hex, label: HighEvent }
21+
find-high-low@{ shape: rounded, label: FindHighLowValues<br>**find-high-low** } -.-> low_event@{ shape: hex, label: LowEvent }
2222
```
2323

2424
## Defining events

0 commit comments

Comments
 (0)