Splunk Search

Creating a stacked bar chart

BearMormont
Path Finder

I feel silly asking this question as I think it should be relatively straight forward, but I am not able to get the following search query into a dashboard to display as a stacked bar chart.

I have a search that produces the following table output:

Status                    TotalCount
Ready                     800
Not Ready                 200

What I would like is to display this a stacked barchart 1000 units long with Ready 800 of them and the Not Ready the remaining 200.

Could someone point me in the right direction?

Thanks,
Matt

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Stacked bar charts expect a two-dimensional table, not just a one-dimensional list: One dimension for the x-axis, another dimension for the colour-axis.

To turn your list into such a table, you'll need to create a single-valued dummy dimension and then rotate the table like this:

... | eval Value = "Count by Status" | xyseries Value Status TotalCount

Depending on how you generated your list, you might be able to change that search to directly come up with a result that looks like this:

Value              NotReady     Ready
Count by Status         200       800

View solution in original post

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Stacked bar charts expect a two-dimensional table, not just a one-dimensional list: One dimension for the x-axis, another dimension for the colour-axis.

To turn your list into such a table, you'll need to create a single-valued dummy dimension and then rotate the table like this:

... | eval Value = "Count by Status" | xyseries Value Status TotalCount

Depending on how you generated your list, you might be able to change that search to directly come up with a result that looks like this:

Value              NotReady     Ready
Count by Status         200       800
0 Karma

BearMormont
Path Finder

Thanks!

Worked great.

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!

Automating Threat Operations and Threat Hunting with Recorded Future

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

Keep the Learning Going with the New Best of .conf Hub

Hello Splunkers, With .conf26 getting closer, there’s already a lot of excitement building around this year’s ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...