Link graphs
Use link graphs to visualize the relationship between data values. Similar to a table, link graphs have rows and columns.
Each row contains nodes that represent a value or values. If there are multiple rows of the same value, the values group together in a single node.
The visual links connecting rows and columns represent the relationship between data values. Links will only show between adjacent columns in the visualization. You can rearrange the columns by adding the source option fieldOrder to the source code.
Generate a link graph
- Select the Add chart button (
) in the editing toolbar and browse through the available charts. Choose the link graph.
- Set up a new data source by selecting + Create search, + Create saved search, or + Create chain search and adding a search or select an existing data source under the Search, Saved search, or Chain search sections.
- Select Apply and close.
Configuration panel options
You can use the Configuration panel to configure the following link graph components.
Title
Give your visualization a name. This is also helpful when searching for individual visualizations in the dashboard definitions. This name is not the same as the automatically assigned unique ID.
Description
Give your visualization a description to explain what the user is viewing.
Data sources
You can choose one of the following data options:
- An existing data source or create a new data source
- A chain search
- A saved search
- Enable When data is unavailable, hide element to hide the visualization when data is unavailable.
- Configure custom visibility conditions if desired. See Specify visibility conditions for panels and other dashboard elements.
Position and size
In absolute layout, you can use your mouse to change the size of the panel, or the Position and size section of the Configuration panel for pixel perfect sizing and placement.
Data configurations
- Result limit: specify the number of nodes rendered in each column.
Data display
- Show node counts: toggle on to display the number of nodes for each column. If there are hidden nodes, the total number of nodes also displays.
- Show value counts: toggle on to display a count for the frequency of occurrence for each distinct node value.
Color and style
-
Title color: configure a font color for the visualization title.
-
Description color: configure a font color for the visualization description.
- Nodes: specify the color used for unhighlighted nodes.
-
Selected nodes: specify the color used for highlighted nodes.
-
Links: specify the color used for links between nodes. Non-highlighted links display at 20% opacity.
- Background color: specify the color used for the background. The default for enterprise light is hexadecimal "#FFFFFF". The default for enterprise dark is hexadecimal "#000000".
-
Adjust the sizing of nodes and space with the following:
- Node width
- Node height
- Vertical spacing
- Horizontal spacing
- Link width
Interactions
Select + Add interaction to set up different visualization interactions such as linking to a custom URL, setting tokens, or linking to a report. For more details, see Add dashboard interactions.
Select your visualization or its search to view and edit the source code in real-time. You can also change the Visualization ID to a more readable ID to help identify this visualization in the source code.
Link graph example
The following link graph example bypasses the visual editor and directly sets the graph's data source in the source editor.
Example data table
The table example demonstrates the data structure needed to generate a link graph.
| Breakfast | Lunch | Dinner |
|---|---|---|
| cheese | quiche | souffle |
| croissant | sandwich | dinner roll |
| eggs | frittata | strata |
| eggs | quiche | strata |
| eggs | custard | egg tart |
| eggs | shakshuka | huevos rancheros |
Source code
[...]
"visualizations": {
"viz_qb5GpdzC": {
"type": "splunk.linkgraph",
"dataSources": {
"primary": "ds_linkgraph"
},
"options": {
"nodeColor": "#f8be44",
"linkColor": "#dc4e41",
"resultLimit": 15,
"nodeWidth": 340,
"nodeHeight": 50,
"nodeSpacingY": 20,
"nodeSpacingX": 34,
"linkWidth": 4
}
}
},
"dataSources": {
"ds_linkgraph": {
"type": "ds.test",
"options": {
"data": {
"columns": [
[
"cheese",
"croissant",
"eggs",
"eggs",
"eggs",
"eggs"
],
[
"quiche",
"sandwich",
"frittata",
"quiche",
"custard",
"shakshuka"
],
[
"souffle",
"dinner roll",
"strata",
"strata",
"egg tart",
"huevos rancheros"
]
],
"fields": [
{
"name": "Breakfast"
},
{
"name": "Lunch"
},
{
"name": "Dinner"
}
]
}
}
}
},
[...]
Source options for link graphs
The following options are available for editing link graphs in the source editor.
| Property | Type | Default | Description |
|---|---|---|---|
| backgroundColor | string | > themes.defaultBackgroundColor | Specify the color for the background. You may use a dataSource to apply the color. The default for enterprise light is "#ffffff". The default for enterprise dark is "#000000". The default for prisma dark is "#0b0c0e". |
| fieldOrder | string | > primary | getField() | Specify the order of fields to be displayed in the link graph from left to right when loaded. Unspecified fields will be excluded from the graph. |
| linkColor | string | #6d6f76 | Specify the color used for highlighted links. Unhighlighted links will be displayed at 20% opacity. |
| linkWidth | number | 1 | Specify, in pixels, the stroke width of each link. |
| nodeColor | string | > themes.defaultNodeColor | Specify the color used for unhighlighted nodes. |
| nodeTextColor | string | > nodeColor | maxContrast(nodeTextColorMaxContrast) | Specify the color used for unhighlighted nodes text. |
| nodeHeight | number | 21 | Specify, in pixels, the height of each node. |
| nodeHighlightColor | string | #7B56DB | Specify the color used for highlighted nodes. |
| nodeTextHighlightColor | string | > nodeHighlightColor | maxContrast(nodeHighlightTextColorMaxContrast) | Specify the color used for highlighted nodes text. |
| nodeSpacingX | number | 32 | Specify, in pixels, the horizontal spacing between each node. |
| nodeSpacingY | number | 18 | Specify, in pixels, the vertical spacing between each node. |
| nodeWidth | number | 180 | Specify, in pixels, the width of each node. |
| resultLimit | number | 50 | Specify the number of nodes rendered in each column. |
| showNodeCounts | boolean | TRUE | Specify whether a count is shown for the number of nodes displayed in each column. The number of total nodes is also shown if there are hidden nodes. |
| showValueCounts | boolean | TRUE | Specify whether a count is shown for the frequency of occurrence for each distinct node value. |