|
| 1 | +# Graph view |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +The **Graph view** consists of the following elements: |
| 6 | + |
| 7 | +- **Global menu** - Switch between any of the main pages. |
| 8 | +- **Toolbar** - Manipulate the current selection. |
| 9 | +- **Context menu** - Shows contextual information about the current selection. |
| 10 | + - **Overview** - Information the currently selected graph or sub-graph. |
| 11 | + - **Layout** - Modify how the layout engine displays the graph. |
| 12 | + - **Selected** - Information about the selected node or edge. |
| 13 | + - **Graph settings** - Modify the style properties of a selected node or edge. |
| 14 | +- **Graph canvas** - Displays the current graph or sub-graph. You can select a node or edge to show it's information in the **Context menu**. |
| 15 | +- **Temporal view** - Displays the edges of the current graph or sub-graph as a timeline of events. On longer timescales edges are shown as a heatmap instead of discrete events. |
| 16 | + |
| 17 | +## Modifying the graph Layout |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +The Raphtory UI gives you detailed control over how your graphs are displayed. You can use this to match your preferences, build custom visualisations for reports or better fit the shape of your data. |
| 22 | + |
| 23 | +Raphtory's layout engine is built on [G6](https://github.com/antvis/G6) and many of the [D3 Force-Directed Layout](https://g6.antv.antgroup.com/en/manual/layout/d3-force-layout) parameters are exposed in the **Layout** tab of the **Context menu**. |
| 24 | + |
| 25 | +You can select from the following layout algorithms: |
| 26 | + |
| 27 | +- Default |
| 28 | +- Concentric |
| 29 | +- Force Based |
| 30 | +- Hierarchical TD |
| 31 | +- Hierarchical LR |
| 32 | + |
| 33 | +For each layout, specific **Advanced Options** can be set to tune the algorithm. |
| 34 | + |
| 35 | +### Default Layout |
| 36 | + |
| 37 | +| Parameter | Description | |
| 38 | +|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 39 | +| Collision Radius | The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping. You can specify the effective radius. | |
| 40 | +| Collision Strength | Sets the strength of the collision force. | |
| 41 | +| Link Distance | Specify an ideal edge length. | |
| 42 | +| Link Strength | Higher link strength results in distances closer to the ideal. | |
| 43 | +| Many-Body Force | The mutual force between nodes, a positive value is attractive and a negative value is repulsive. | |
| 44 | +| Many-Body Range | Set a maximum and minimum distance between nodes that where many-body forces are applied. | |
| 45 | +| Center Force | Applies a uniform force on all nodes towards the center. | |
| 46 | +| Radial Force Strength | Applies a uniform force on all nodes within a specified radius towards the center. | |
| 47 | +| Radial Force Radius | Specify a radius for the radial force. | |
| 48 | + |
| 49 | +### Concentric Layout |
| 50 | + |
| 51 | +| Parameter | Description | |
| 52 | +|----------------------------|--------------------------------------------------------------------------| |
| 53 | +| Use Clockwise | Enable to add nodes in a clockwise order. | |
| 54 | +| Maintain Equidistant Rings | Enable to require equidistant rings. | |
| 55 | +| Node Size | Effective node diameter. This effects ring spacing to avoid collision. | |
| 56 | +| Node Spacing | Minimum spacing between rings. | |
| 57 | +| Prevent Overlap | Enable to prevent overlap between nodes. Only works if Node Size is set. | |
| 58 | +| Start Angle | Start angle where the first node is added. Specified in radians. | |
| 59 | +| Sweep | Angle between the first and last nodes in the same ring. | |
| 60 | + |
| 61 | +### Force Based Layout |
| 62 | + |
| 63 | +| Parameter | Description | |
| 64 | +|-----------|-------------------------------------------------------------------------------------------------| |
| 65 | +| Gravity | Applies a force on all nodes towards the center proportional to their distance from the center. | |
| 66 | +| Speed | Movement speed per iteration of the algorithm. | |
| 67 | + |
| 68 | +### Hierarchical TB Layout |
| 69 | + |
| 70 | +| Parameter | Description | |
| 71 | +|----------------------------|------------------------------------------------------| |
| 72 | +| Invert | Enable to invert the direction. | |
| 73 | +| Direction | Specify how the node hierarchy should be aligned. | |
| 74 | +| Node Separation | Separation of nodes in the same rank. | |
| 75 | +| Rank Separation | Separation between ranks. | |
| 76 | +| Rank algorithm | Specify the algorithm used to assign nodes to ranks. | |
| 77 | +| Node Size | Node size used for collision. | |
| 78 | +| Retain Edge Control Points | Enable to use control points. | |
| 79 | + |
| 80 | +### Pre-layout algorithms |
| 81 | + |
| 82 | +Optionally, you can set a pre-layout algorithm that runs before the primary layout algorithm: |
| 83 | + |
| 84 | +- Concentric - arranged around the center. |
| 85 | +- Dagre LR - arranged using the hierarchical Dagre algorithm from left to right. |
| 86 | +- Dagre TB - arranged using the hierarchical Dagre algorithm from top to bottom. |
| 87 | + |
| 88 | +For Concentric and Dagre TB algorithms you can also specify **Advanced Options** when used in the pre-layout phase. |
| 89 | + |
| 90 | +## Modify styles |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +You can modify the styles applied to nodes and edges from the **Graph settings** tab of the **Context menu**. |
| 95 | + |
| 96 | +You can perform both global and local changes which are saved as properties in the graph. |
| 97 | + |
| 98 | +### Set the styles for a specified node type |
| 99 | + |
| 100 | +1. Clear all selections. |
| 101 | +2. Switch to the **Graph settings** tab of the **Context menu** |
| 102 | +3. Click the **Select Node Type** drop down and choose a node type or 'None'. |
| 103 | +4. Specify a colour using the **Node Colour** palette. |
| 104 | +5. Specify a **Node Size** value. |
| 105 | +6. Click **Save**. |
| 106 | + |
| 107 | +### Set the styles for a specified edge layer |
| 108 | + |
| 109 | +1. Select any edge. |
| 110 | +2. Switch to the **Graph settings** tab of the **Context menu** |
| 111 | +3. Click the **Select Edge Layer** dropdown and choose a layer. |
| 112 | +4. Specify a colour using the **Node Colour** palette. |
| 113 | +5. Specify a **Node Size** value. |
| 114 | +6. Click **Save**. |
| 115 | + |
| 116 | +### Set the styles for the currently selected node |
| 117 | + |
| 118 | +1. Select any node. |
| 119 | +2. Switch to the **Graph settings** tab of the **Context menu** |
| 120 | +3. Specify a colour using the **Node Colour** palette. |
| 121 | +4. Specify a **Node Size** value. |
| 122 | +5. Click **Save**. |
| 123 | + |
| 124 | +!!! Note |
| 125 | + Styles set on an individual node override styles set on a node type. Additionally, styles can only be applied to individual nodes, if you have multiple nodes selected the last node you selected will be updated. |
0 commit comments