You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/documentation/tooldevelopers/graphdatastructure/elktextformat.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,19 +9,18 @@ menu:
9
9
10
10
The ELK text format has five basic elements: nodes, ports, labels, edges and edge sections.
11
11
Details about each element can be found below.
12
-
Note that the ELK text format uses default values for some things such as node sizes if they are not specified to make writing elkt files more convenient.
12
+
Note that the ELK text format uses default node sizes if they are not specified to make writing elkt files more convenient.
13
13
This is different from the JSON format, where no such defaults are assumed.
14
14
15
15
## Nodes, Ports, Labels, Edges, and Edge Sections
16
16
17
-
All elements, except labels, must have an _id_ that uniquely identifies them.
18
-
Labels are usually not referred to from other parts of the graph,
19
-
which is why the id is optional.
17
+
Nodes and ports must have an _id_ that uniquely identifies them.
18
+
Labels are usually not referred to from other parts of the graph, which is why the id is optional.
20
19
The id is a string that has to begin with a letter.
21
20
All elements furthermore can have [_layout options_]({{< relref "reference/options.md" >}}).
22
-
Layout options are basically a list of key-value pairs that are used to
23
-
assign layout option values to the element.
21
+
Layout options are basically a list of key-value pairs that are used to assign layout option values to the element.
24
22
Layout options can be an enum value, an enum set, an integer, a double, or other more complex objects.
23
+
For each layout option the type is specified in the [_reference_]({{< relref "reference/options.html" >}})
25
24
26
25
```elkt
27
26
layoutOption1: ENUM_VALUE
@@ -35,13 +34,19 @@ A special case is [_padding_]({{< relref "reference/options/org-eclipse-elk-padd
[_Individual spacings_]({{< relref "reference/options/org-eclipse-elk-spacing-individual.html" >}}) are essentially a map of options.
38
+
39
+
```elkt
40
+
spacing.individual: "TODO"
41
+
```
42
+
38
43
## Nodes, Ports, and Labels
39
44
40
45
Nodes, ports, and labels have a two-dimensional location and size. Each of these elements
41
46
can also have an arbitrary number of labels to describe them properly. Yes, even labels can
42
47
have labels, although it depends on the layout algorithm whether or not it supports labeled
43
48
labels.
44
-
The `layout block is used to specify the size and positions of these elements.
49
+
The optional `layout` block may be used to specify the size and positions of these elements.
45
50
46
51
```elkt
47
52
layout [
@@ -57,11 +62,10 @@ Edges can connect to a node either directly or through one of its ports.
57
62
A node can also contain an arbitrary number of child nodes.
58
63
A graph is actually nothing more than a simple node whose children are the top-level nodes of the graph.
59
64
Finally, a node can contain edges.
60
-
While it is common to define those edges under a given node that connect that node's children, in fact any edge may be defined under any node, regardless of its
61
-
end points. This allows for flexibility when defining hierarchy-crossing edges, as well as for
62
-
alternative schemes, such as defining all edges at the root level.
63
-
See [_Coordinate System_]({{< relref "documentation/tooldevelopers/graphdatastructure/coordinatesystem.md" >}})
64
-
for the rules for interpreting edge coordinates.
65
+
While it is common to define those edges under a given node that connect that node's children, in fact any edge may be defined under any node, regardless of its end points.
66
+
This allows for flexibility when defining hierarchy-crossing edges, as well as for alternative schemes, such as defining all edges at the root level.
67
+
Note that this is not recommended and in some cases poorly supported.
68
+
See [_Coordinate System_]({{< relref "documentation/tooldevelopers/graphdatastructure/coordinatesystem.md" >}}) for the rules for interpreting edge coordinates.
65
69
66
70
```elkt
67
71
node n {
@@ -81,7 +85,7 @@ Ports do not have any more interesting properties. Ports are boring.
81
85
82
86
## Labels
83
87
84
-
Labels can additionally contain text.
88
+
Labels contain text.
85
89
Note that layout algorithms
86
90
generally don't perform any size estimation of the text.
87
91
Therefore you should specify a reasonable width and height.
0 commit comments