Splunk Search

How to stop timechart drilldown using javascript?

vikas_gopal
Builder

Hi Experts,

I am struggling to stop time chart drilldown using js. Here is the code.

this._chartView = new ChartView({
                managerid: 'details-search-manager',
                'charting.legend.placement': 'none'
                'charting.drilldown': 'none'    
});

'charting.legend.placement': 'none' is working absolutely fine but 'charting.drilldown': 'none' is getting ignored by Splunk. Please help.

0 Karma
1 Solution

vikas_gopal
Builder

The only stupid problem with my code was that I was missing ',' in the 3rd line .Due to this silly mistake Splunk was ignoring 3rd line .

View solution in original post

0 Karma

vikas_gopal
Builder

The only stupid problem with my code was that I was missing ',' in the 3rd line .Due to this silly mistake Splunk was ignoring 3rd line .

0 Karma

bmacias84
Champion

Javascript provides a method called preventDefault(). The method must be tied to an event. Below is an example using table.

splunkTable = new TableView({
    id: "members"+epoch2.getTime(),
    managerid: elementSearch,
    el: $(innerElement)
}).render();
splunkTable.on("click", function(e) {
    e.preventDefault();
});

The sample above is an extract from a working Splunk project.

preventDefault

vikas_gopal
Builder

Thanks for the solution , it works. The only stupid problem with my code was that I was missing ',' in the second line .Due to this silly mistake Splunk was ignoring 3rd line .Thanks again

0 Karma

bmacias84
Champion

Thank for you for voting my answer up, could you accept it?

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...