# Diagrams

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/ruby/2026.3/llms.txt).

> **TL;DR**
> `File | Settings | Tools | Diagrams` for Windows and Linux
>
>
>
> `RubyMine | Settings | Tools | Diagrams` for macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![the Settings icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

In the Diagrams menu, you can configure the default visibility settings and layout for [diagrams](working-with-diagrams.html).

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/js_ts_building_module_dependency_diagram.mp4)

## Content pane

Select the checkboxes next to the elements to be shown on diagrams.

| Item | Description |
| --- | --- |
|                     Show Difference  |
| Details | If this checkbox is selected, all the specified details of the elements will be shown in the UML class diagram for a revision. If this checkbox is not selected, only node elements will be included in the diagram. |
|  DB Diagrams   |
| Key columns |    For the primary key columns to be shown when a diagram opens, select this checkbox.      When viewing a diagram in the editor, use ![the Key Columns button](https://resources.jetbrains.com/help/img/idea/2026.3/database-plugin.icons.colGoldKey.svg) on the toolbar to show or hide the corresponding columns.   |
| Columns |    For the columns other than the primary key columns to be shown when a diagram opens, select this checkbox.       When viewing a diagram in the editor, use ![the Columns button](https://resources.jetbrains.com/help/img/idea/2026.3/database-plugin.icons.col.svg) on the toolbar to show or hide the corresponding columns.   |
|  Graphical Explain Plan  |
| Attributes |    Toggles the display of query attributes on a query map. These attributes can be a number of rows, index names, or any other additional information about the query. For more information about building a query map, refer to [Visualize                               a query plan](query-execution-plan.html#visualize_query_plan).      Enabled:    ![Enabled and disabled attributes on a query plan](https://resources.jetbrains.com/help/img/idea/2026.3/db_query_plan_attributes_enabled.png)   Disabled:    ![Disabled and disabled attributes on a query plan](https://resources.jetbrains.com/help/img/idea/2026.3/db_query_plan_attributes_disabled.png)    |
|  Ruby Class Diagram  |
| Class Elements |     Select the checkboxes below to show members within the node elements.      |
|  Rails Model Dependency Diagram  |
| Element |     Select the checkboxes below to show members within the node elements.      |

> **Note:**
> More nodes appear in this pane depending on the installed and enabled plugins.

## Controls

| Item | Description |
| --- | --- |
| Default layout | Select the desired layout from the Default layout list. Node elements in newly created diagrams will be arranged according to the selected layout. |
| Default scope | Select scope from the Default scope list. Specifying a scope helps you avoid showing in diagram the unnecessary hierarchies. You can define scopes for your project in the [Scopes page](settings-scopes.html) of the Settings (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))) dialog. |
| Fit content after layout | If this checkbox is selected, then after applying a layout selected on the diagram context menu, all diagram elements will be resized to fit into the current diagram area. In diagram, use the ![the Fit Content icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.image.fitContent.svg) toolbar button.  |
| Do relayout when new elements were added | If this checkbox is selected, diagram layout will be performed automatically after adding new elements.  |

