Dashboards & Visualizations

Bar Chart

sanjay_shrestha
Contributor

Hi,

Here is my data looks like:

project     status
p1            s1
p2            s3
p3           
p4            s1
p5            s2

I would like to create a bar chart as below:
alt text

Thanks,

Sanjay

Tags (1)
0 Karma

sanjay_shrestha
Contributor

Thanks for the solution.

0 Karma

somesoni2
Revered Legend

I couldn't fine any options for that so far. Here is another tweak see if this is acceptable for you.

search giving field project, status| eval nStatus=case(status="s1",1,status="s2",2,status="s3",3,1=1,0) | chart max(nStatus) as MyStatus over project by status | rename VALUE as NA

status will appear as legend and bars will have different color for each status.

0 Karma

sanjay_shrestha
Contributor

I was able to create using numerical values, however it would not be verbose. Is there a way to change labels or display reference matching table.

0 Karma

rahulroy_splunk
Path Finder

something like this

search giving field project, status | eval nStatus=case(status="s1",1,status="s2",2,status="s3",3,1=1,4) | table project, nStatus

somesoni2
Revered Legend

I believe the Y axis values have to be numeric, which is not in your case. Other option could be to use a numeric code for your status and do a chart based on that.

Get Updates on the Splunk Community!

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

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...