Splunk Search

TimeRangePicker Charting Question

Ant1D
Motivator

Hey,

I have written the following advanced dashboard that allows me to view results in a simple table based on what option I choose in my timerangepicker:

<view template="dashboard.html">

<label>Test Dashboard</label>

<module name="AccountBar" layoutPanel="navigationHeader"/>

<module name="AppBar" layoutPanel="navigationHeader"/>

<module name="Message" layoutPanel="messaging">

<param name="filter">*</param>

<param name="clearOnJobDispatch">False</param>

<param name="maxSize">1</param>

</module>

<module name="HiddenSavedSearch" layoutPanel="panel_row1_col1" group="It will work...eventually" autoRun="True">

<param name="savedSearch">crashes Dev</param>

 <module name="TimeRangePicker">

         <param name="searchWhenChanged">True</param>

         <param name="default">Last 24 hours</param>

     <module name="SimpleResultsTable">

     </module>

 </module>

How can I modify this code so that I can still use the timerangepicker but now have the results displayed in a bar chart and not a SimpleResultsTable?

Also, how would I be able to specify what values I add to the x and y axis?

0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

replace your SimpleResultsTable with this:

<module name="HiddenChartFormatter">
  <param name="charting.chart">bar</param>
  <module name="FlashChart">
  </module>
</module>

Check out the module reference page on splunk.com, and you can always go to http:///en-US/modules in your browser, on any splunk install to read the autogenerated docs for the modules and params they have.

(and you can go to /en-US/info for a couple other useful things to.)

And even better than all this would be to download the "UI examples for 4.1" app from splunkbase. If you're more into learning from hands-on examples you might find it a better resource than the docs. It has 50 or 60 examples at differing levels and in different areas and you can tweak them and learn by experimenting.

View solution in original post

sideview
SplunkTrust
SplunkTrust

replace your SimpleResultsTable with this:

<module name="HiddenChartFormatter">
  <param name="charting.chart">bar</param>
  <module name="FlashChart">
  </module>
</module>

Check out the module reference page on splunk.com, and you can always go to http:///en-US/modules in your browser, on any splunk install to read the autogenerated docs for the modules and params they have.

(and you can go to /en-US/info for a couple other useful things to.)

And even better than all this would be to download the "UI examples for 4.1" app from splunkbase. If you're more into learning from hands-on examples you might find it a better resource than the docs. It has 50 or 60 examples at differing levels and in different areas and you can tweak them and learn by experimenting.

Ant1D
Motivator

Hey Nick, thanks for the help and thanks for the examples also 😄 I'm sure they will be handy. It would be great to get some more examples in the documentation.

0 Karma

ftk
Motivator

You will want to use the FlashChart module instead of the SimpleResultsTable module. Then use the HiddenChartFormatter to format the chart. You can use the chart param to specify a bar chart.

Take a look at the other chart formatting modules in the module reference and you will see there is a plethora of options to customize your charts.

0 Karma

Ant1D
Motivator

Thanks for the info ftk. I wish there were some examples to go with all those chart options 😄

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

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

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...