Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Dashed lines with automatic edge grouping problem

0 votes

When multiple edges that are all formatted as dashed lines are joined together by the hierarchical "automatic edge grouping" option. some of them overlap to cause what looks like a solid line.  In a diagram that uses both dashed and solid lines to show to different things, this causes a lot of confusion.

in Help by (870 points)

1 Answer

0 votes

This is a known effect of grouping dashed edges. (It is not even a surprising effect if you think about it for a bit.)

There are two solutions:

  1. Do not group edges with dashed lines.
  2. Only use source grouping and only at shared source nodes.

The latter will work, because the dash patterns always start at the source intersection point of the edges.

by [yWorks] (160k points)
Could we add a feature request, such as "consider line formatting" ?
I'm afraid I don't understand that feature request. Can you explain what you mean by "consider line formatting"?
What I mean is, yEd should retain a coherent line formatting style when it choses to overlap them.  To avoid multiple dotted or dashed lines being formatted as a solid line when they are unified into one.  Through experimentation I found that only some unified dashed lines appear as solid.  In a lot of cases yEd does a good job and renders multiple overlayed dashed lines as a single dashed line.
Unfortunately, "a coherent line formatting style" for overlapping dashed edges is not possible for mathematical and technical reasons.

Suppose you have a dash pattern of [4,2], i.e. four pixel long dash, two pixel distance to the next dash. Suppose further, you start one edge at (0,0) and another edge at (0,2), because the corresponding nodes "end" at those coordinates. You cannot start your edges at other coordinates, because they have to start at their nodes. Obviously, the dashes of one line overlap the gaps of the other line thereby creating a "solid" visualization.

While this is just one example, it is possible to create such an example for any strategy you can think of for determining "a coherent line formatting".

Moreover, you are not free to choose any strategy you can think of, because you also need to take into account how time-consuming your strategy is. That really does not leave a lot of options for an approach that works "fast enough" even for thousands of edges.
Legal Disclosure | Privacy Policy