Dashboards & Visualizations

how to hide/show panel in the dashboard based on radio button

sravankaripe
Communicator

i have a dashboard with 3 panels .
i want to hide/show my 3rd panel based on radio button.
Please provide sample code for my use case.

0 Karma
1 Solution

cmerriman
Super Champion

I have mine written out based on a checkbox, but you can probably tweek it for a radio button. Overview is my panel title that I'm hiding.

     ...
<input type="checkbox" token="overview" searchWhenChanged="true">
            <label>Overview</label>
            <choice value="true">Show</choice>
            <change>
              <condition label="Show">
                <set token="overview">true</set>
              </condition>
            </change>
            <default>true</default>
          </input>
    ...
    <panel depends="$overview$">
    ...

View solution in original post

AzJimbo
Path Finder

I used this today for a results panel - thank you.

However, If you just have html to present (instructions or overview or what ever) you can use the html5 tags

<panel>
<html>
    <details>
    <summary>here's the deetz</summary>
    <p>the deetz you're talking about</p>
    <details>
    <summary>sub-deetz</summary>
    <p>the nested sub deetz in html</p>
    </details>
    </details>
</html>
</panel>
0 Karma

cmerriman
Super Champion

I have mine written out based on a checkbox, but you can probably tweek it for a radio button. Overview is my panel title that I'm hiding.

     ...
<input type="checkbox" token="overview" searchWhenChanged="true">
            <label>Overview</label>
            <choice value="true">Show</choice>
            <change>
              <condition label="Show">
                <set token="overview">true</set>
              </condition>
            </change>
            <default>true</default>
          </input>
    ...
    <panel depends="$overview$">
    ...
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...