Dashboards & Visualizations

How to specify multiple token with <panel depends="$token$ "> for a single panel

Sss
Path Finder

Hi,

I have a bar chart(Fig 1:),where it's y-axis has three different field-i.e; based on each month we get this in-terms  of three different bar(A,B & C) for that particular month.

where i wanted drilldown for this panel,but the problem is this particular panel is dependent on these 3bars,while specifying the token within panel i.e; <panel depends="$token$" > how can i specify these different tokens within one particular panel such that when i click on any of these bar,I should get drilldown for only that particular selected bar in the panel.

Fig 1:

Sss_0-1683865531408.png

 

Labels (1)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The name of the series / bar being clicked on is available in $click.name2$ - you can use this in your drilldown code to set a token which is use in the search in your panel (and for the depends for the panel too)

TrangCIC81
Communicator

You may not use <panel depends="$token$" >. It requires a comma-separated list of token names but not a single token value. For example:

 

<module>
    <panel>
        <input type="text" token="token1" default="default_value" searchWhenChanged="true"/>
        <input type="text" token="token2" default="default_value" searchWhenChanged="true" depends="token1"/>
        <input type="text" token="token3" default="default_value" searchWhenChanged="true" depends="token1, token2"/>
    </panel>
</module>

 

token2 depends on token1, and token3 depends on both token1 and token2. This means that when the value of token1 changes, it will automatically update the values of token2 and token3.

Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...