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!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...