Splunk Search

How to separate colors on my bar chart

michaelnorup
Communicator

Hey guys.

So i have a search which created a bar chart

 

 

| rex field=_raw "(.Net Version is)\s+(?<DotNetVersion>.+)"
| stats latest(DotNetVersion) as DotNetVersion by host
| fillnull value="-"
| eval status=case(match(DotNetVersion,"Not!"),"noncompliant",1=1,"Compliant")
| chart count by status

 

 

 

michaelnorup_0-1645167974195.png

 

I have tried most options in the xml but i cant get it to be green/red =/

michaelnorup_1-1645168008278.png

 

Any ideas? Thought the ".fieldColors" would do the trick, but i think maybe my field is called "count" instead of Compliant/noncompliant



Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You need a (dummy) x-axis dimension

| eval label="count"
| chart count by label status

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Try seriesColors

<option name="charting.seriesColors">[#53A051,#DC4E41]</option>
0 Karma

michaelnorup
Communicator

This works if i change it to a pie chart, but it changed both colors in the bar chart

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need a (dummy) x-axis dimension

| eval label="count"
| chart count by label status

ITWhisperer
SplunkTrust
SplunkTrust

Try this

| stats count by status
0 Karma

michaelnorup
Communicator

Nope =/

0 Karma
Get Updates on the Splunk Community!

Splunk Classroom Chronicles: Training Tales and Testimonials

Welcome to the "Splunk Classroom Chronicles" series, created to help curious, career-minded learners get ...

Access Tokens Page - New & Improved

Splunk Observability Cloud recently launched an improved design for the access tokens page for better ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

&#x1f342; Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...