Dashboards & Visualizations

Y Axis Scaling

cdstealer
Contributor

alt textHi,
We have a few dashboards were we set the Y axis height depending on the query results. However, it seems that this option has now been removed in 6.5.0?

The answer to this question is what we were doing and worked great. Is there any way to have this functionality again? Downgrading is not an option 😉

Cheers
Steve

0 Karma

cmerriman
Super Champion

If you're using this for a bar chart, according to the doc, charting.axisY.maximumNumber is still an option.

http://docs.splunk.com/Documentation/Splunk/6.5.0/Viz/ChartConfigurationReference

Could there be a problem with the token being set? Can you post your syntax?

0 Karma

cdstealer
Contributor

Hi Cmerriman,
Thanks for the reply. Everything was working and only broke with the upgrade. Anyways, here are the code snippets.

Define the token:

     <input type="dropdown" token="YAxisMax" searchWhenChanged="false" depends="$hidden$">
     <search>
      <query>REALLY BIG SEARCH</query>
      </search>
      <fieldForLabel>YAxisMax</fieldForLabel>
      <fieldForValue>YAxisMax</fieldForValue>
      <selectFirstChoice>true</selectFirstChoice>
    </input>

Chart code:

  <row>
  <panel>
      <chart>
        <title>XIV Usage For Each Site by $displayby$</title>
        <search>
          <query>REALLY BIG SEARCH</query>
          <earliest>-60m@m</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.maximumNumber">$YAxisMax$</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">0</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">column</option>
        <option name="charting.chart.bubbleMaximumSize">50</option>
        <option name="charting.chart.bubbleMinimumSize">10</option>
        <option name="charting.chart.bubbleSizeBy">area</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.showDataLabels">none</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">stacked</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.drilldown">none</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">right</option>
      </chart>
    </panel>
</row>

Hope that helps 🙂

Thanks
Steve

0 Karma

cmerriman
Super Champion

Do you set the token $YAxisMax$ after REALLY BIG SEARCH? I see in the answer that you linked it was in an input.

I was thinking that you could add

...
</search>
<preview>
<set token="YAxisMax"=$result.<fieldname>$></set>
</preview>
<option name="charting......

where the is the field where the y axis count is coming from. Not sure if it'd work or not, but that's how I generally set tokens that I use in my dashboards.

0 Karma

cdstealer
Contributor

Hi Sorry, Yes, we set the token before the search. This UI removed my code, I've added it back 😉

The way our code works is it defines the token before any panels as the token is used in several charts. This definition is on a search that has the maximums and this maximum is used for each chart so there is a visual representation of use.

The chart below is an example. The chart on the left would be the maximum and this maximum would also be used for the chart on the right.

!!!! I hate that you can't attach images to comments 😞 Added to the top post.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...