Dashboards & Visualizations

How to add vertical scrolling to a bar chart?

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

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

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
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!