Dashboards & Visualizations

How to set color code result based on uniqueness

balash1979
Path Finder

I am running a query and it provides me the following result (as an example)

ENV VALUE
env1 1234
env2 2345
env3 1234
env4 2345

Is there a way I can color code the lines that are same, meaning, i would like in my panel to show a color for the lines
env1 1234
env3 1234

and some other color for lines
env2 2345
env4 2345

Basically, I am trying to do a color coding scheme so in my dashboard if my panel has different colors its an alarm for me that something is different. Ideally, I shud have the same value for all the lines, meaning all the VALUE should be 1234 for different ENV.

0 Karma
1 Solution

test4u
Path Finder

HI,
I have used the following approaches:-
1. Run the following query to a bar chart
index="main" sourcetype="csv"|chart count by VALUE,ENV
and then use
"option name="charting.seriesColors">[C0392B,F1C40F]"

  1. you can use a pie chart and do ->>index="main" sourcetype="csv"|statscount by VALUE further you can user chart.fieldColors as follows :- " option name="charting.fieldColors">{1234:C0392B, 2345:F1C40F}" Let me know if any fulfills your purpose

View solution in original post

0 Karma

test4u
Path Finder

HI,
I have used the following approaches:-
1. Run the following query to a bar chart
index="main" sourcetype="csv"|chart count by VALUE,ENV
and then use
"option name="charting.seriesColors">[C0392B,F1C40F]"

  1. you can use a pie chart and do ->>index="main" sourcetype="csv"|statscount by VALUE further you can user chart.fieldColors as follows :- " option name="charting.fieldColors">{1234:C0392B, 2345:F1C40F}" Let me know if any fulfills your purpose
0 Karma
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...