Convert data to diagrams with yEd

Written Material

In the next step, you can label the existing symbols if necessary. To do this, first click the element you want to label with the right mouse button and select Add Label in the context menu. The editor now opens a box with a red outline above the symbol in which you can enter the text. Pressing Enter tells the yEd tool to center the string above the element. Alternatively, you can enter the text in the context-dependent Properties | General Text area.

You can position the box with the text freely with respect to the element. To do so, left-click the label outside of the symbol to tell the software to switch to editor mode. The program shows this change as a double outline. Next, move the box by dragging it to the desired location.

The application displays grid lines that make it easy to adjust the frame with respect to the symbol (e.g., centering it below the element). Then, right-click within the frame and select Properties in the context menu. The editor will now open another window with formatting buttons (Figure 3).

Figure 3: If necessary, you can format the text for labeling an item.

When you enter text with the Add Label option, yEd shows you the entire content you enter in a single line; this can appear very clumsy, especially if you have entered a long piece of text. However, you can use the Text dialog box in the General tab to enable line breaks so that your text input adapts to the length of the symbol.


Even simple charts can be rather confusing if they have many nodes and you design them without an underlying structure. To solve this problem, the program offers a variety of automatic layout solutions. Once you have completed a chart, you can change the layout by calling one of the options in the Layout menu, which you will find in the menubar at the top of the program window.

After clicking on one of the alternatives available there, yEd opens a window in which you can set various parameters. To confirm, click Ok at the bottom left in the window. The program then arranges the content according to your specifications. yEd offers many layout options, and nearly all of these options offer many additional settings for individual elements, so it is worthwhile experimenting with the alternatives.

To restore to the state before a change was made in a chart, select Undo, the first entry in the Edit menu. The program then shows the original chart in the editor again. If the chart is too big for a complete view, you can customize the size using the zoom function, so that you can see the entire chart. The Show entire graph switch in the button bar supports automatic scaling (Figure 4).

Figure 4: An unstructured graph (left) and the same graph automatically structured (right).

Once you have found a suitable structure via the layout function, you can still adjust the individual elements if necessary. To help you do so, the software provides a function for defining a grid for the work area. This helps you more easily align each symbol. Select the grid by clicking the Grid button in the tool bar.

Lined Guide

Especially in large charts with many intersecting lines between nodes, it is often easy for the viewer to lose track of the paths. To remedy this, yEd offers a function for automatic routing of the existing lines. Again, you can choose between different modes and experiment until the result satisfies your expectations.

You can access this tool in the Layout | Edge Routing menu. In the corresponding submenu, click the desired line and then configure the required settings in the dialog. Besides setting the distances between individual lines, you can also define a distance between the nodes and specify whether the software also adjusts the labels. The number of existing intersections is another parameter you can set in the dialogs.

After pressing Ok, the software makes the changes. You should still check the results, especially for complex charts: Overlapping lines and labels will typically occur in the context of captions on central nodes. It is advisable to move the text blocks of the nodes manually in this case (Figure 5).

Figure 5: Simplifying the routing of connecting lines keeps the chart easy to understand.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Perl: Google Chart Instructions

    A CPAN module passes drawing instructions in object-oriented Perl to Google Chart, which draws visually attractive diagrams.

  • Mermaid

    Mermaid lets you create diagrams from simple text-based statements.

  • Data Visualization in Python

    Python's powerful Matplotlib, Bokeh, PyQtGraph, and Pandas libraries lend programmers a helping hand when visualizing complex data and their relationships.

  • Graphviz

    Using drawing tools to manually create graphs and diagrams can be a slow and convoluted process. The Graphviz toolbox offers a faster way. Based on a short text with the information for the graph, Graphviz quickly generates a neat drawing.

  • Mind Maps

    Mind maps are designed to help display processes and projects clearly in a graphical format. This review explores the design possibilities offered by five mind map programs.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95