Dashboards & Visualizations

How can I force a bar chart to display all x-axis entries

Path Finder

I have 10 results, but the chart compresses the tick labels to only show 5. I've tried setting the following to no avail.

  <option name="primaryAxisLabels.majorTickVisibility">show</option>
  <option name="primaryAxisLabels.minorTickVisibility">show</option>
  <option name="secondaryAxisLabels.majorTickVisibility">show</option>
  <option name="secondaryAxisLabels.minorTickVisibility">show</option>

I guess I want to make the chart taller so that it will display all the entries (for instance if it were a top 10 list)

Tags (1)
0 Karma
1 Solution

SplunkTrust
SplunkTrust

Well if making the chart bigger is an option, and leaving the tick mark stuff set to the defaults (auto), then you can set the height

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

but have you tried the majorUnit key?

<option name="primaryAxisLabels.majorUnit">10</option>
<option name="primaryAxisLabels.majorUnit">1</option>

http://www.splunk.com/base/Documentation/4.1.3/Developer/ChartReference

View solution in original post

Splunk Employee
Splunk Employee

This will force all the labels to show, regardless if there's enough room to display all of them without overlapping:

<option name="charting.primaryAxisLabels.majorLabelVisibility">show</option>

Unfortunately, there is no auto-scaling functionality that will change the dimensions of the chart based on the number of labels on an axis. Your best option if you don't want overlapping is to manually increase the height using the height option.

SplunkTrust
SplunkTrust

Well if making the chart bigger is an option, and leaving the tick mark stuff set to the defaults (auto), then you can set the height

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

but have you tried the majorUnit key?

<option name="primaryAxisLabels.majorUnit">10</option>
<option name="primaryAxisLabels.majorUnit">1</option>

http://www.splunk.com/base/Documentation/4.1.3/Developer/ChartReference

View solution in original post

Path Finder

Yep, tried those verbatim and the chart still scales in height to only show 5 of the results. Forcing the height with the height option mentioned works, but is there no auto-scaling functionality that would handle that?

I figured one of the tags I mentioned above would have provided that. no?

0 Karma