Skip to content

Commit

Permalink
docs: Add expamles for custom_diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
huyenngn committed Nov 12, 2024
1 parent ceb0bee commit 8b238b0
Showing 1 changed file with 39 additions and 16 deletions.
55 changes: 39 additions & 16 deletions docs/custom_diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,51 @@

# Custom Diagram

`Custom diagram`s let's you create custom diagrams based on the data in the model. You define the data collection using a YAML-based declarative language.
`Custom diagram`s let's you create custom diagrams based on the data in the model. You define the data collection using a dictionary.
You can access `.custom_diagram` on any supported model element.

## Example

Here is an example YAML file that declares a context diagram:
Here are example collection definitions in YAML format for different diagrams:

```yaml
get:
- name: inputs
include:
- name: exchanges
- name: links
- name: outputs
include:
- name: exchanges
- name: links
- name: ports
??? example "Custom diagram for context"

```yaml
get:
- name: inputs
include:
- name: exchanges
- name: links
- name: outputs
include:
- name: exchanges
- name: links
- name: ports
include:
- name: exchanges
- name: links
```

??? example "Custom diagram for cable tree"

```yaml
repeat: -1
get:
- name: source
include:
name: links
- name: target
include:
name: links
```

??? example "Custom diagram for exchanges"

```yaml
include:
- name: exchanges
- name: links
```
- name: allocated_functional_exchanges
- name: allocated_interactions
```

## Collector definition

Expand Down

0 comments on commit 8b238b0

Please sign in to comment.