Dashboards & Visualizations

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

caphrim007
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

sideview
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

jgatt
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.

sideview
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

caphrim007
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
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...