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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...