Dashboards & Visualizations

color a pie chart slice

autoteam
Engager

Hello, 

I have a pie chart that shows me the count of all the alerts I get on my system, stats by severity.

Because I couldn't find a way to show the count (only the percentage) then I changed the name so it will contain both the severity name and the count (used eval function).

before I changed the name I used charting.fieldcolores to set a specific color to each severity(slice), now that the name constantly changing because the count is changing I wasn't able to set a color to each slice.

I tried using charting.seriescolors but when I use that I cant determine that the critical severity will always get a red color and the warning gets orange and so... because the color is not set to a specific slice. 

I wanted to ask if there is a way I can set the colors regularly to a name when I don't have the full name of the slice, maybe using a (*) like- "Critical*" and then the slice that contain the word critical will always color in red?

If it is not possible, is there a way to show the count and not the percentage! without using eval and changing the slice name?

 

all answers will help!

thanks!!!

 

Labels (2)
0 Karma
1 Solution

autoteam
Engager

It worked! thank you so much!

0 Karma

autoteam
Engager

Hi,

As I understand from the answer I still have a problem since I can't ensure that  all the labels will stay present because when the value is 0 it is absent. this is one of the things that bothered me with the seriescolor...

In addition I want to keep the count in the label name not to change it. I saw they used eval in the answer.

what can I do with those cases?

 

thanks again!!!

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust
When you are using seriesColors it's not matter what labels you have. Only thing what you must ensure is the order and amount of those fields. That must be always fixed.
r. Ismo
0 Karma

autoteam
Engager

Ok, so how can I ensure that?

I tried setting the colors in the seriescolors by the order of the labels but sometimes the changed when I had a value of 0 and that's when my problem started...

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

From @niketn 's response:

The command after |append ensure all series are always present and in the same sequence so that seriesColors can be applied. While testing you can randomly take out specific series like status=\"Progress\",count=10; to test that it creates a Process row with 0 count and 0%. Please try with seriesColors and confirm!

Can you do it like this?

r. Ismo 

0 Karma

autoteam
Engager

I will try first thing first on Sunday an let you know!

thank you so much!! 

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!

Index This | What travels the world but is also stuck in place?

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

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...