Splunk Search

Bar chart with single bar does not display

simpkins1958
Contributor

We have horizontal bar charts on our dashboards and when SPL is filtered down to single bar the bar is not displayed.

Is this a know Splunk bug. We are using 7.0alt text

0 Karma

simpkins1958
Contributor

If remove:

    <option name="charting.axisTitleX.visibility">collapsed</option>

then bar is display otherwise it is not.

alt text

0 Karma

niketn
Legend

@simpkins1958, please add your dashboard code.
I think issue could be
1) Either at main bar chart drilldown token (so you should display tokens you set in the Panel <title> OR
2) Second chart should have same by clause as first bar chart.

You can try out the following run anywhere dashboard (base on Splunk's _internal index) to understand

<dashboard>
  <label>Bar chart drilldown.</label>
  <row>
    <panel>
      <title>Bar chart Main Panel</title>
      <chart>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
|  stats count by component 
|  sort - count
|  head 5</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.drilldown">all</option>
        <drilldown>
          <set token="tokClickedName">$click.name$</set>
          <set token="tokClickedvalue">$click.value$</set>
        </drilldown>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <title>Drilldown Bar chart - ( $tokClickedName$=$tokClickedvalue$ )</title>
      <chart>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO $tokClickedName$=$tokClickedvalue$
  | stats count by $tokClickedName$        
          </query>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.drilldown">none</option>        
      </chart>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

simpkins1958
Contributor

It is a single bar chart having trouble with. Not one bar chart and drilling down to second bar chart.

Your test code works fine.

Here is some of my XML for the chart that is not working. If I remove X visibility the bar is displayed fine.

        <option name="charting.axisTitleX.visibility">collapsed</option>
        <option name="charting.axisTitleY.visibility">collapsed</option>
        <option name="charting.chart">bar</option>
        <option name="charting.drilldown">none</option>
        <option name="charting.legend.placement">none</option>
0 Karma

niketn
Legend

@simpkins1958 , can you give the query for second Bar Chart with single bar? I tried with the properties you have provided and it works fine.

  <row>
    <panel>
      <title>Single Value Bar chart</title>
      <chart>
        <search>
          <query>index=_internal sourcetype=splunkd log_level!=INFO
|  stats count by component 
|  sort - count
|  head 1
|  eval component="58-6D-8F-23-6A-31 - Gocougs"</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="charting.chart">bar</option>
        <option name="charting.drilldown">none</option>
         <option name="charting.axisTitleX.visibility">collapsed</option>
         <option name="charting.axisTitleY.visibility">collapsed</option>
         <option name="charting.chart">bar</option>
         <option name="charting.drilldown">none</option>
         <option name="charting.legend.placement">none</option>
      </chart>
    </panel>
  </row>

Just a thought, if your Bar chart is going to be single series, you can also check out Marker or Filler Gauge with rangemap to make more sense out of data.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@simpkins1958, for me the Chart behavior is as expected. So please provide Second Bar chart search query, if your issue is still not resolved.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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 ...