Splunk Cloud Platform

Splunk Dashboard Studio

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Conditionally show or hide panels

Organize your dashboard or conceal empty panels by conditionally showing or hiding panels based on data availability. For example, suppose a chart on your dashboard is empty because it depends on a token setting from a different visualization. In that case, you can hide the chart until the token is set and data is available.

Both Grid and Absolute layout support conditionally showing or hiding panels.

To conditionally hide a panel, follow these steps:

  1. Select your visualization or input.
  2. Navigate to the Visibility section of the Configuration panel.
  3. Select "When data is unavailable, hide element" and a dotted blue line will surround your visualization or input.

The following elements support hiding panels conditionally:

Element Grid layout Absolute layout
Charts X X
Icons n/a X
Line shape n/a n/a
Rectangles X X
Ellipses n/a X
Dropdown input X X
Multiselect input X X

About the grid layout conditional visibility logic

If you hide a visualization in the grid layout, the dashboard balances the composition of the remaining visualizations by adjusting their sizes. The grid layout prioritizes filling any blank space within the canvas to achieve compositional completeness.

When the grid layout resizes visualizations, it prioritizes adjusting the visualizations neighboring a hidden element. The grid layout works across the dashboard from left to right and top to bottom.

Visualizations with equal proportions

The grid layout maintains the proportion of space used by the viewable visualizations based on shared columns or rows. For example, you might have 4 visualizations in a row, each occupying 25% of the width of the dashboard canvas, and you decide to hide 1 of the visualizations. The remaining 3 visualizations respond to the hidden visualization by adjusting their widths to 33%.

Visualizations with unequal proportions

If you intentionally create a dashboard visualization larger than its fellow visualizations, the larger visualization stays proportionally more prominent than the other visualizations throughout the resizing process. For example, you might have 3 visualizations in a row. 1 visualization takes up 50% of the dashboard, and the other 2 take up 25%. If you hide a small visualization, the larger visualization will adjust to about 65%, and the remaining small visualization will adjust to about 35%.

Example of show or hide in the dashboard definition

You can control the condition of showing or hiding panels with the hideWhenNoData option in the dashboard definition. The following example shows the hideWhenNoData set to true, which activates the show or hide feature.

"visualizations": {
  "viz_Z0robcvp": {
    "type": "splunk.singlevalue",
    "dataSources": {
      "primary": "ds_6j1uZkit"
    },
    "hideWhenNoData": true
  }
},
Last modified on 07 September, 2023
PREVIOUS
Embed user and environment details with environment tokens
  NEXT
Set global and local defaults

This documentation applies to the following versions of Splunk Cloud Platform: 9.1.2308 (latest FedRAMP release), 9.1.2312


Was this documentation topic helpful?


You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters