Dashboards & Visualizations

Bar chart minimum height

slyskawa
Engager

I am creating a bar chart in a dashboard panel that requires more than the default height because of the number of elements in the chart. How can I setup the chart so that users are not forced to resize the chart themselves in order to read the labels.

I tried the following with no success:

  <option name="charting.chart.useAbsoluteSpacing">true</option>
  <option name="charting.chart.barSpacing">5</option>
  <option name="height">900</option>
Tags (1)
1 Solution

sideview
SplunkTrust
SplunkTrust

By your syntax you're referring to the Simplified XML <chart> syntax, and you're really really close. It is indeed the "height" option. The problem is that you have to put a "px" on the end or it will ignore your height.

<option name="height">400px</option>

One other thing to be aware of, is that whenever a user actually does resize the chart, then the value they resized it to will take effect thereafter, even if the admin goes in afterwards and changes the value specified in the XML.

There are things you can do to remedy that, like turning off the state-preservation on the dashboard so it doesn't remember the resized heights later, or turning off the resizing UI so the user can't resize the chart at all. However I think both of those require converting to the advanced XML first.

View solution in original post

sideview
SplunkTrust
SplunkTrust

By your syntax you're referring to the Simplified XML <chart> syntax, and you're really really close. It is indeed the "height" option. The problem is that you have to put a "px" on the end or it will ignore your height.

<option name="height">400px</option>

One other thing to be aware of, is that whenever a user actually does resize the chart, then the value they resized it to will take effect thereafter, even if the admin goes in afterwards and changes the value specified in the XML.

There are things you can do to remedy that, like turning off the state-preservation on the dashboard so it doesn't remember the resized heights later, or turning off the resizing UI so the user can't resize the chart at all. However I think both of those require converting to the advanced XML first.

slyskawa
Engager

I found that "height" satement in an post under answers, I couldn't find it in the official documenation. I have no problem witht he user resizing the chart afterwards, I just want to avoid the "it's all squished together" emails that I would receive if I don't increase the default.

Thanks for your timely and accurate response.

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...