Relational diagrams in draw.io
The diagram below has been produced by the draw.io app that is Available either:
- As a native (javascript) app in the browser: https://app.diagrams.net/
- As a desktop app (javascript)
- Embedded in a confluence page
- Store the data locally, not on a server offering data privacy / protection: https://drawio-app.com/drawio-data-protection/
- either as xml files in the browser or hard drive / one-drive embedded in the confluence page
This article covers a quick way to produce dependency / hierarchy diagrams such as the one on the above. The process is simple and, with a small modification can be turned into an interactive model — click the link below to see the finished product.
High level workflow #
- Edit the data in Excel and save in csv format
- Copy the data from the raw csv file and use a text editor to combine it with static header
- instructions
- Paste the data and instructions into draw.io
- Review the diagram, if you are happy with it, publish it.
- Take the published URL and modify it to make it interactive
- Share / update the final URL.
The data we’ll use is based on the layout of a house — the hall leads to the downstairs rooms and stairs which lead to the upstairs rooms. Rooms contain items.
How is your data related? #
- a depends on b OR
- b has a as a dependent
Step #1: Build your data mapping / hierarchy in a csv format spreadsheet. #
A sample is provided: drawio.sample.csv. In the screenshot below there are 9 columns. They control how draw.io builds your diagram. Note that the column names can be anything you choose as long as the name aligns with the header instructions. The ones provided in the example are a good starting point.
| Column | Purpose |
|---|---|
| Id | this can be any number or string that is unique across the rows. You refer to this in the dependency columns (called ‘leads_to’ and ‘contains’ in this example). It does not have to be called ‘id’ but whatever it is called has to match with the header instructions that are covered below. |
| Type | This is a column that hasn’t been used by draw.io in this example. It is added to demonstrate that you can have additional columns to help you categorise / review your data in spreadsheet format |
| name | This is a column that is referred to in the header instructions to label the shape |
| Fill | This is used by the header instructions to control what colour to fill the shapes with. If the cell is empty then white is used |
| stroke | This is used by the header instructions to control what colour to use for the border of the shape. |
| strokeWidth | This is used by the header instructions to control what colour to use for the border of the shape. |
| shape | If supplied, draw.io will use the shape template rather than a rounded box (this is also controlled / referenced in the header instructions) |
| leads_to | In this example, this controls which ‘id’ labelled rows this row leads to |
| contains | In this example, this controls which ‘id’ labelled rows this row contains e.g. an item of furniture |
Dependency columns #
Although the column names are generic, your diagram will probably have different columns for ‘leads_to’ or ‘contains’. Call them whatever works best for your mapping. You can also have as many as you require although you will need at least one (or else what is the point) and more than 3 probably makes the diagram too busy.
If you find that you have several dependencies to map, it is possible to have them all in one spreadsheet but control what the diagram shows based on which set of header instructions you use. For example your data could show one viewpoint based on header set ‘A’ and another that picked up different columns dependencies using header instruction set ‘B’. Two diagrams sourced from the same data via two header instructions.
Step #2: Copy the raw CSV data and, using a text editor, paste it below a set of header instructions #
The header instructions control how draw.io builds the diagram. An example that relates to the sample CSV data is below:
- any line starting ## is a comment for your use and will not be processed
- paste your CSV data below the last line
- key fields that you are likely to modify are:
Expand to see the final header and CSV data
Step 3:Paste the text into draw.io #
- open up draw.io (browser or in-line confluence)
- start a new diagram or new tab
- from the menu choose: Arrange Insert Advanced CSV … />
- clear the sample data from the popup window
- paste your text into the window and click ‘Import’
- your diagram should be built in the draw.io window.
You are free to modify the diagram, add labels and copy / paste into other documents. If however you wish to share an interactive version, you will need to publish it as a shareable URL.
Step 4 :Publish the diagram #
- In the draw.io menu, click File Publish Link
- Make selections as appropriate — normally you’ want to de-select ‘All Pages’
- Click create and copy the text of the URL to a text editor
You can share this URL which is a static copy of the diagram — to make it clickable you will need to add an extra parameter to the query string.
Как добавить столбцы и строки в таблицу draw.io?
Как вставить новые строки и столбцы в таблицу в перспективе для рисования текста макета.io?
Предполагая, что вы ссылаетесь на объект таблицы в тексте макета, при переходе в режим редактирования (двойной щелчок) выберите одну из строк. Когда вы сделаете это, секция таблицы появится на панели форматирования справа с обычной строкой вставки / столбцом, до / после.


Элементы управления таблицей появляются, когда выбрана конкретная ячейка, как показано на скриншоте. Работает для всех столов, будь то «Разное» или «Макет» и т. Д.
- Один клик выбирает таблицу
- Двойной клик выделяет весь текст в таблице
- Тройной щелчок выбирает конкретное содержимое ячейки, а затем на панели появляется элемент управления таблицей
используйте опцию поиска в draw io для проверки таблицы 

Затем дважды щелкните внутри ячейки таблицы, чтобы получить параметры редактирования таблицы на правой панели, чтобы добавить или удалить строку / столбец.
Improved table shapes
Tables have been overhauled in draw.io to be much more flexible and robust than the old HTML tables you previously used. With the new tables, you can choose from various layouts, drag to resize rows and columns, move rows by dragging them, and build cross-functional flowcharts within a table and its cells.
Tip: The entity shape used in UML entity relationship diagrams has also been updated to take advantage of the updated table features.
Add a table to a diagram
Use the table tool in the toolbar to add a table to your diagram as you would in Microsoft Word or Google Docs.

- With nothing selected in your diagram, click on the Table tool in the toolbar.
- Hover over the squares until the number of rows and columns you want are highlighted, then click to insert a table on the drawing canvas. You can add more rows and columns later.
Add a table title when you insert a table

- Hold down Shift and click on the Table tool in the toolbar.
- Hover over the squares until the number of rows and columns you want are highlighted, then click to insert a table on the drawing canvas. This will automatically add a title row that spans all of the columns.
Add text to table cells
Click once to select the table, then click again on a cell to select it. Enter your text just like you would a shape label.

Add a cross-functional flowchart (table)
Cross-functional flowcharts use categories to group steps in a business process, for example, how steps are assigned to different functional groups (such as departments), or stages of approval. Each category is represented by a vertical or horizontal swimlane. As standard flow charts are unable to show this information, many businesses prefer to use cross-functional flowcharts.
Create a table with horizontal and vertical swimlanes, where you can add process steps into the cells of the table, and join them with connectors to show the process flow.

- With nothing selected in your diagram, click on the Table tool in the toolbar.
- Select the Container checkbox, or hold down the Ctrl / Cmd key while you select a table with the number of rows and columns you need. Click to add the table with cross-functional swimlanes to the drawing canvas.
- Select the table, click on a title cell, then enter the title text. If you are entering one of the row titles, as you enter the text will be centred — it will move into position when you finish adding the text.
As the cells in a cross-functional table function as container shapes, you can add shapes to them. Build your flowchart by placing the steps in their cells and then joining them with connectors.

Add columns and rows
- Select a cell inside of a table.
- Select the Arrange tab in the format panel on the right.
- Use the table tools to add a column or row before or after your selected cell or row. If you have selected the entire table, this will add a row or column at before the beginning or at the end of the table.

Use a keyboard shortcut to copy a table row
- Click on a cell in your table, then click on it again to select the row.
- Hold down either Ctrl or Cmd , grab and drag a copy of the row to a new position in the table, or press Enter .
Move rows in a table
You can drag rows to new positions in the updated tables, either by selecting and grabbing the row itself, or using the reposition icon that looks like two horizontal lines on the right border of each row.
- Select the row — click to select a cell, then click again to select the row — then drag it to a new position.
- Alternatively, select the table (not a cell or a row/column), then grab and drag the row’s reposition icon.
Note: The reposition icons on the right double as connection points. If you try to drag the reposition icons without first selecting the table, you’ll attach a fixed connector at that point.
Resize rows and columns in a table shape
- Grab and drag the row or column borders to resize the row or column.
Make sure you don’t grab the reposition icon on the right border of a row — this will move a row, rather than resize the column.
You can also resize the table keeping all of its cells relative to each other — this is behaviour is enabled by default.
- Select the table, then drag the round handle at the side of the table instead of the final column or row border.
- Drag the orange diamond in the middle of the table below the table title row.
If you don’t want to resize the other cells, change the table properties.
- Select the table (not a cell or a row/column).
- In the format panel on the right, expand the Properties section.
- Ensure the checkboxes for Resize last row and Resize last column are selected.
Resize all swimlane titles
When you resize a cell in a cross-functional table, you will resize only that particular column’s or row’s title cell. You can resize all row or column titles at once so they are consistent.
- Hold down Shift as you resize one of the column or row titles.
Delete rows or columns
- Select a cell inside of a table.
- Select the Arrange tab in the format panel on the right.
- Use the table tools to delete the selected column or row.

Use the keyboard to delete a row
- Click on a cell in the table, then click on it again to select the row.
- Press the Delete key, or right click and select Delete from the context menu.
Merge and unmerge cells
Merge adjacent cells and unmerge merged table cells via the Arrange tab in the format panel, or using the Table tool in the Sketch whiteboard-like editor theme.

- Merge is only available when you have selected multiple adjacent table cells.
- Unmerge is only available when you have selected a merged cell in a table.
HTML tables are still available
The HTML table shapes are still available in the Misc shape library (part of the General shape library). Hover over the shapes to see their names.
Adding Rows and Columns to a Table in draw.io: A Guide
To select a table, you can either single-click on it or double-click to select all its text. If you triple-click on a cell, you can select its contents and access the table control on the panel. To add or delete a row/column in a table, you can use the search option in draw io to find the table and then double-click inside a cell to access the table edit options on the right pane. Alternatively, if you are using the VSCode extension, you can find the table edit options under the Arrange tab. If you are wondering how to insert new rows and columns in a table for a draw.io Mockup, consider following Solution 1.
How do I add columns and rows in a draw.io table?
What is the process for adding rows and columns to a table in perspective to the draw.io Mockup Text?
Solution 1:
If you're talking about the Table object in Mockup Text, enter edit mode by double-clicking and choose a row. This will prompt the table section to show up on the right side, where you can find the standard options for inserting rows and columns before or after.

Solution 2:

The appearance of table control s is triggered by selecting a specific cell, as depicted in the screenshot. This functionality is applicable to tables from various categories, such as "Misc" or "Mockup".
- Single click selects the table
- The entire text in the table can be selected by double-clicking.
- When a cell's contents are selected by triple-clicking, a table control will be displayed on the panel.
Solution 3:
To locate a table in Draw.io, utilize the search function as shown in
.

To add or remove a row/column in a table, simply double-click on the cell and access the table edit options located on the right pane.

Solution 4:
Under the Arrange tab, table edit options are available for those utilizing the VSCode extension. See
for reference.
How to add, edit and style labels and text in draw.io
Learn how to diagram with draw.io with this quick start
Learn how to use the tools and panels, find and add shapes to your diagram, add connectors, and more in this introduction to draw.io .Diagramming software can
Drawing Mechanical Systems in LaTeX
Although I prefer using CircuiTikZ to create drawing diagrams in my LaTeX documents, my focus is primarily on draw mechanical rather than electronic systems. Consequently, I am searching for an alternative method to design mechanical systems. Specifically, I require a tool that can construct objects such as masses, springs, dampers , and ground (which functions as a boundary condition). The diagrams on page 16 serve as common illustrations.

Do you have any recommendations or am I out of options?
Solution 1:
Taking inspiration from Andrew Stacey's beautiful artwork, this is my interpretation of two of the images you provided. As you continue to create drawings like these, you will soon develop your own collection of components, making future illustrations simpler to produce.

Solution 2:
Drawing a coupled pendulum using TikZ tools is quite simple, as mentioned by Jake. This particular diagram is often used in my lectures.

The significant aspect to observe is the spring, which, as mentioned by Jake in his comment, is achieved by substituting the route with a coil.
Solution 3:
you can use this package
This website provides a pgf-tikz cinematic diagram.
Solution 4:
With the release of circuitikz v0.6 in 2016, this task has become a piece of cake.

Is it possible to insert text with Subscripts/Superscripts in draw.io?
While I can add nodes, I'm unable to include text with subscripts such as "P_i(n)" in these nodes.
Solution:
Choose the node and verify that its label is enabled with HTML formatting by going to Text -> Formatted Text.

After initiating the editing process for the label, which is currently in HTML format, the toolbar will swap to the HTML label toolbar and will offer a choice for subscript.