Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

SplunkJS code check

$
0
0
I am new to JS in general and shiny new to SplunkJS. I've been looking for ways to change labels on a chart graph and came across this JS suggestion here (https://jsfiddle.net/BlackLabel/nqb7fxd3). From what I can see Splunk needs a 'wrapper' to go around the JS to work properly, so my question to the great and wise is the code below going to work? require([ "splunkjs/mvc", "splunkjs/mvc/simplexml/ready!" ],var labels = ['First', 'Second', 'Third', 'Fourth', 'Fifth', 'Sixth'] Highcharts.chart('container', { yAxis: { labels: { formatter: function() { return labels[this.pos - 1] } } }, series: [{ data: [3, 2, 4, 5] }] });

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>