Dashboards & Visualizations

How to add vertical scrolling to a bar chart?

tejajag
Explorer

I am trying to display a bar chart with only 10 events displayed at a time and is vertically scrollable to view all the events.

0 Karma
1 Solution

tejajag
Explorer

Following approach worked for me!

  1. set the height option in the xml such that it displays only 10/required number of results
  2. set a token in the xml that stores the count of query results(use $job.resultCount$) when the query execution is in progress/done.
  3. use Java Script to get the count token value using splunkJS defaultTokenModel and calculate the height to set based on the result count and then set the height on $('#bar.viz-controller') element.

View solution in original post

0 Karma

tejajag
Explorer

Following approach worked for me!

  1. set the height option in the xml such that it displays only 10/required number of results
  2. set a token in the xml that stores the count of query results(use $job.resultCount$) when the query execution is in progress/done.
  3. use Java Script to get the count token value using splunkJS defaultTokenModel and calculate the height to set based on the result count and then set the height on $('#bar.viz-controller') element.
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...