All Apps and Add-ons

Splunk Custom Viz Drilldown

henryopie
New Member

Hi All

Already created a custom Vizualisation. Having an issue with the drilldown. 
In XML set the drilldown option: 
<option name="drilldown">all</option>

inside drilldown: 
<drilldown>
<set token="test1">$click.value$</set>
<set token="test2">$click.field$</set>
</drilldown>
Also set the title of the panel to: 
<title>Test1: $test1$, test2: $test2$</title>

JS in the custom viz:

var payload = {
action: SplunkVisualizationBase.FIELD_VALUE_DRILLDOWN,
data: {}
};
 
payload.data[field] = value;
this.drilldown(payload);
 
The on click the drilldown sets the tokens to $click.value$ and $click.field$ (the strings)

Any help ?
 
Labels (1)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@henryopie 

Can you please share your sample XML. and JS code? It will help us to replicate the issue.

 

KV

0 Karma

henryopie
New Member

XML: 
<dashboard script="table.js" stylesheet="table.css">
<label>Custom View 3</label>
<row>
<panel>
<title>Test1: $test1$, test2: $test2$</title>
<viz type="splunk-accessibility-app.piechart">
<search>
<query>index="_audit" | stats avg(linecount) by user</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<option name="drilldown">all</option>
<option name="splunk-app.piechart.dedup">False</option>
<option name="splunk-app.piechart.xaxislabel">X Axis Label</option>
<option name="splunk-app.piechart.yaxislabel">Y Axis Label</option>
<drilldown>
<set token="test1">$row.value$</set>
<set token="test2">$row.field$</set>
</drilldown>
</viz>
</panel>
</row>
</dashboard>

wont send the whole visualization.js:
In the highcharts: 

series: {
   events: {
      click: function click(e) {
 
     drilldown(e);
}
}
}

// The function that is called

function drilldown(value) {

var payload = {
action: SplunkVisualizationBase.FIELD_VALUE_DRILLDOWN,
data: {}
};
 
payload.data['value'] = value;
 
this.drilldown(payload);
 

};

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...