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: README.md
+84-21Lines changed: 84 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
<!-- omit in toc -->
2
+
1
3
# Flow Visualization
2
4
3
5
This is a [React] application to generate flow graphs from [JSON] or [YAML].
@@ -8,7 +10,8 @@ It is built on top of [ReactFlow].
8
10
-[Global defaults](#global-defaults)
9
11
-[Nodes](#nodes)
10
12
-[Edges](#edges)
11
-
-[Buttons](#buttons)
13
+
-[Buttons](#controls)
14
+
-[FAQ](#faq)
12
15
-[License](#license)
13
16
14
17
## How to run
@@ -20,13 +23,13 @@ and open http://localhost:3000/.
20
23
## Documentation
21
24
22
25
If you [run the application](#how-to-run), you'll see that there are three editors. One to
23
-
set [global defaults](#global-defaults), one to describe the [nodes](#nodes) and one for the [connections](#edges)
26
+
set [global defaults](#global-defaults), one to describe the [nodes](#nodes), and one for the [connections](#edges)
24
27
between these nodes (edges). The editors you see are the same editors used
25
-
by [Visual Studio Code](https://code.visualstudio.com/),
26
-
this means that you can use shortcuts like `ctrl+shift+i` for indentation or `ctrl+z` to undo your last change. You can
28
+
by [Visual Studio Code](https://code.visualstudio.com/).
29
+
This means that you can use shortcuts like `ctrl+shift+i` for indentation or `ctrl+z` to undo your last change. You can
27
30
also open the command palette by hitting the `F1`-key.
28
31
29
-
Note when reading this documentation: this is a [React] application, so all ID's/properties are
32
+
Note when reading this documentation: this is a [React] application, so all ID's and properties are
30
33
written in [camelCase](https://en.wikipedia.org/wiki/Camel_case).
31
34
32
35
### Global defaults
@@ -42,6 +45,16 @@ nodes or edges.
42
45
43
46
* More info: [nodes](schemas/docs/nodes-doc.md)
44
47
48
+
#### ID
49
+
50
+
IDs are used by the edges to refer to a node. But IDs are not mandatory. If no ID is specified:
51
+
52
+
* If the node has a unique `title`, the title becomes the ID.
53
+
* If the node has a unique `label`, that label becomes the ID.
54
+
* If the node has a unique `shape`, that shape becomes the ID.
55
+
* If the node has a unique `image`, that image becomes the ID.
56
+
* Otherwise, there is no way (as the end user) to refer to that node.
57
+
45
58
#### Node positioning
46
59
47
60
[As seen before](#nodes), you can set the positions of all nodes individually with the `position` key. But it is not
@@ -62,36 +75,25 @@ very efficient to set all nodes manually. There are three mechanisms to make the
62
75
- Use the `autoLayout` key:
63
76
- If set to `true`, [dagre](https://github.com/dagrejs/dagre) is used to position all the nodes. The keys `position`
64
77
, `vgroup` and `hgroup` are ignored. This method works for very simple flows (e.g. example 1). If your flows start
65
-
to get a little more complex, this method is not recommended, because dagre does not always work very well in
78
+
to get a little more complex, this method is not recommended because dagre does not always work very well in
66
79
combination with this project.
67
80
68
81
### Edges
69
82
70
83
* More info: [edges](schemas/docs/edges-doc.md)
71
84
72
-
#### Animations
73
-
74
-
There is a key `animated`, which you can set to `true`. But if you want custom animations, you should use
75
-
the `animation` property. An example of the standard `animated` key can be found
76
-
in [example 2](/src/data/examples/exampleData2.js). Custom animations can be
77
-
found in [example 6](/src/data/examples/exampleData6.js). For more information about the `animation` property, please
78
-
check out
79
-
the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/animation). If you use `animated` with
80
-
no `strokeDasharray`, `strokeDasharray` is set to a value of `5`. If you use a custom `animation`, the `animated` key
81
-
has no effect anymore.
82
-
83
-
### Buttons
85
+
### Controls
84
86
85
87
When running this application, you'll see that there are a few buttons visible.
86
88
87
89
#### Example buttons
88
90
89
-
These buttons on are for loading in examples.
91
+
These buttons are for loading examples.
90
92
91
93
#### Import/export buttons
92
94
93
95
These buttons are to import and export entire configs (format is JSON). This feature is useful if you want to save
94
-
configs for later.
96
+
configurations for later.
95
97
96
98
There is also a button to export the raw data. This is the data needed for [ReactFlow] to draw up a flow.
97
99
@@ -125,13 +127,74 @@ See [DEVELOPMENT.md](DEVELOPMENT.md#permalink) for more information about the st
125
127
126
128
#### Autosync button
127
129
128
-
If this switch is toggled on, the flow will render automatically if the config has been changed and is valid.
130
+
If this switch is toggled on, the flow will render automatically if the configuration has been changed and is valid.
129
131
130
132
#### Snap to grid button
131
133
132
134
If this switch is toggled, the nodes will be snapped to the grid. If this switch is not toggled, you can move the nodes
133
135
more freely.
134
136
137
+
#### Enter permalink input field
138
+
139
+
If you have a link `https://knowledgeonwebscale.github.io/dataflow-visualization/#/customdata?...`, you can enter that
140
+
link in the text input field. The configs encoded in that URL will be filled in into the editors, so you can edit and
141
+
create a new permalink.
142
+
143
+
#### Undo/redo buttons
144
+
145
+
With undo, you can go to a previous (valid) configuration, and with redo, you can move forward.
146
+
147
+
*Autosync enabled*
148
+
The state of the configs is saved if there has been more than two seconds elapsed since the last change in one of
149
+
the editors.
150
+
151
+
If you click on e.g. redo you load in the previous config. That configuration will, of course, not be saved again (
152
+
unless you make a change).
153
+
154
+
*Autsync disabled*
155
+
The state of the configs will be saved every time you press 'convert' and your configs are valid.
156
+
157
+
#### Create simulation button
158
+
159
+
When clicking on this button, you'll be redirected to a new page. On that page, you can create multiple configs. When
160
+
clicking 'convert', you'll be able to animate the flow by visualizing one config after the other.
161
+
162
+
#### Navigation bar
163
+
164
+
Next to the window where your flow is shown, you see a gray bar. This is some sort of "jump bar". Depending on where
165
+
you click on the bar, you'll jump to the height of a different node. If you click somewhere at the very top of the bar,
166
+
you'll jump to the height of the most upper node. The lower you click, the lower the node that will be picked as the
167
+
reference height. If you click somewhere at the bottom of the bar, you'll jump to the y position of the lowest node.
168
+
169
+
This navigation bar is very useful when you want to quickly navigate through a very large network of (vertically
170
+
oriented)
171
+
nodes.
172
+
173
+
## FAQ
174
+
175
+
#### I have an animated edge. How do I change the direction of this animation without messing up my layout?
176
+
177
+
You could, of course, switch `source` and `target`. But when using `autoLayout`, this may mess up your layout a bit. A
178
+
solution could be to use the `animation` key. If you have `animation` set to e.g. `dashdraw .6s linear infinite`, you
179
+
can just change this to `dashdraw .6s linear infinite reverse` and your problem is solved. If you're satisfied with the
180
+
default animations, there is also an option to set `animation` to `reverse`.
181
+
182
+
#### The sizing of some nodes doesn't seem to work. Why?
183
+
184
+
Some shapes are only defined by an aspect ratio. So changing that ratio simply makes it another shape. For example,
185
+
setting a
186
+
different width and height for the shapes `square`
187
+
, `cirle` ... does not make sense.
188
+
189
+
If you do set, e.g., a `square` to a width of, e.g., 50 and a height of, e.g., 100. Then the largest possible square
190
+
will be
191
+
drawn inside a box of 50 by 100 (so in this case, you can expect a height of 50).
192
+
193
+
#### In the simulation creation page, when loading example 1 and clicking convert, I just see a button 'Step 0'. Shouldn't I see more buttons (one per configuration)?
194
+
195
+
Yes, you should see more buttons (you should see a button for step 0 to step 4). Some people reported this bug, this
196
+
is an unresolved issue ([#138](https://github.com/KNowledgeOnWebScale/dataflow-visualization/issues/138)).
197
+
135
198
## License
136
199
137
200
This project is licensed under the terms of the MIT License. See [LICENSE.md](LICENSE.md) for details.
0 commit comments