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
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...