Closed KonradHoeffner closed 7 months ago
Currently, even a single path is hard to see:
The path is:
It's especially confusing that there arrows pointing in the opposite direction because we allow traversal in both directions of a property.
This example shows, how multiple overlapping paths are visualized for trams in Leipzig. Could we use a similar technique? However we don't have fixed lanes.
Google Maps shows everything in the same color, however there it is easier because the general direction is from source to target, while in our case there may be many strange turns.
@Yagnap: Can you help investigate?
We now filter out paths with no instances so there are much less paths shown at the same time. Thus we can just show them side by side by duplicating the paths and shifting them perpendicular to their direction, which should be simple vector math.
Constant shift of (5 5) I think is in now, as next step I will calculate the line shift as discussed.
This works well if the path is just a single line. For multiple paths we probably need:
I didn't like how translating each point except source and target turned out but this new approach is getting nice results:
Here the first and last original points are just added to the beginning, respectively end of the new path where each element is translated separately.
Multiple paths to the software product attributes on the left seem a bit strange but I'm fine with it for now, this doesn't seem worth the effort as we are not here to win design awards but get a research prototype going. However @Yagnap if you have an idea how to improve those cases with little effort feel free to do implement it.
Now we just need to implement edge selection and then we can finally close this issue.
P.S.: Oh we can just set the z-index of the edges behind the nodes, then those artifacts should be lessened. Update: z-index doesn't work with SVG elements, they are positioned with the later drawn elements over earlier drawn ones.
Manually moving all the node definitions to the end of the SVG image does indeed improve the path display. However this will be overwritten when importing the next version of the diagram. We could add this to preprocessing but the current script is based on regular expressions, which are not suited for this operation. Can we change the order in JavaScript? Update: We will change this in the graphml yEd file, see https://github.com/hitontology/hitontology.eu/issues/46.
This feature is now implemented, the issue resolved and the feature branch deleted.
Right now, multiple paths are shown in a table where the user can choose one but that is hard to understand intuitively:
It would be better to visualize different paths in the diagram, but the challenge is to make this easily understandable.