Dashboards & Visualizations

Shrink Y Axis Range

David
Splunk Employee
Splunk Employee

Suppose I'm doing a | timechart span=1d avg(TimeProcessing) as AvgTimeProcessing with a process that averages between 2 and 5, everything looks perfect. But if I have a process that's between, say, .922 and .948, what I get is a ton of white space and then a line with very little variation at the top. Is it possible to have a chart that will display between, say, .85 and 1 for that process, but also work for the process that ranges from 2 to 5?

I know you can set an absolute minimumNumber and maximumNumber. I want the range to be dynamically defined; I just want it to be defined a bit tighter when the variability is small.

Config:

<module name="PostProcess" layoutPanel="panel_row4_col2">
  <param name="search">| timechart span=1d avg(TimeProcessing) as AvgTimeProcessing | eventstats avg(AvgTimeProcessing) as "Overall Average Time Processing"</param>
  <module name="HTML"><param name="html"><![CDATA[<h2>$process.value$ Processing Time</h2>]]></param></module>
  <module name="HiddenChartFormatter">
    <param name="charting.chart">line</param>
    <param name="charting.secondaryAxisTitle.text">ProcessingTime</param>
    <param name="charting.legend.placement">bottom</param>
    <param name="charting.primaryAxisTitle.text">Day</param>
    <param name="charting.chart.axisY.includeZero">False</param>
    <param name="charting.axisLabelsY.integerUnits">False</param>
    <module name="FlashChart">
      <param name="width">100%</param>
      <param name="height">275px</param>
    </module>
  </module>
</module>
Tags (1)
1 Solution

sideview
SplunkTrust
SplunkTrust

What is going on here is that the charting framework has a key called 'includeZero', more specifically charting.chart.axisY.includeZero, and this defaults to True.

1) try this:

<param name="charting.chart.axisY.includeZero">False</param>

2) Check out this question which tells you more:
http://splunk-base.splunk.com/answers/22892/controlling-chart-y-axis-range

3) and the docs tell you even more.
http://www.splunk.com/base/Documentation/latest/Developer/CustomChartingConfig-AxisGrid

Although they say that 'False' is the default value of includeZero which I dont think is true, at least not for the yAxis.

And you may also need to turn the 'integerUnits' key off:

<option name="charting.axisLabelsY.integerUnits">false</code>

View solution in original post

sideview
SplunkTrust
SplunkTrust

What is going on here is that the charting framework has a key called 'includeZero', more specifically charting.chart.axisY.includeZero, and this defaults to True.

1) try this:

<param name="charting.chart.axisY.includeZero">False</param>

2) Check out this question which tells you more:
http://splunk-base.splunk.com/answers/22892/controlling-chart-y-axis-range

3) and the docs tell you even more.
http://www.splunk.com/base/Documentation/latest/Developer/CustomChartingConfig-AxisGrid

Although they say that 'False' is the default value of includeZero which I dont think is true, at least not for the yAxis.

And you may also need to turn the 'integerUnits' key off:

<option name="charting.axisLabelsY.integerUnits">false</code>

sideview
SplunkTrust
SplunkTrust

What happened was that at some point it changed from "charting.chart.axisY.includeZero" to just "charting.axisY.includeZero". The former doesn't work anymore, but the latter does.

jds123
Explorer

I am having this same issue. Was this ever resolved?

0 Karma

sideview
SplunkTrust
SplunkTrust

Yea I think you're right. I know it used to be possible cause we did it on some scatter plot prototypes long ago that had sub-integer ranges and we didnt want the origin shown.

David
Splunk Employee
Splunk Employee

I switched it to lowercase, and still no luck. Sounds like a support request, right?

0 Karma

sideview
SplunkTrust
SplunkTrust

it's just a hunch but I think those charting keys really have to be lowercase true and lowercase false. It may be quietly ignoring your 'False' and thus defaulting to 'true'.

0 Karma

David
Splunk Employee
Splunk Employee

Hmmm. Looks like includeZero = false still includes zero.. Mind taking a look at the full chart config (in the main question), to make sure I'm not missing anything?

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...