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!

Explore the Latest Educational Offerings from Splunk [January 2025 Updates]

At Splunk Education, we are committed to providing a robust learning experience for all users, regardless of ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...