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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...