Dashboards & Visualizations

How to control the colors for a pie chart?

athorat
Communicator

I am trying to use specific colours while using pie charts

Pie chart displays Response Time in milliseconds and its is divided , starting from : " < 50 ms" , "Between 50 to 100 ms" ,
"Between 100 to 250 ms" , "Between 250 to 500 ms " and " > 500 ms"
So the colours should be from green to Yellow to Amber to Orange to Red Respectively.

Can you please have a look at the below entries from the source xml and help me correct the following.
Or may be any other way to control the colours for the chart.

<option name="charting.chart.rangeValues">["< 50 ms","Between 50 ms To 100 ","Between 100 ms To 250 ms","Between 250 ms To 500 ms", "> 500 ms"]</option

<option name="charting.seriesColors">[0xbf3030,ms#ccff00,0x84e900,0xFFFF00,0xFF0000]</option>

Thanks for looking into this

Tags (3)
0 Karma

ramdaspr
Contributor

Assuming that your query responds with the field names " < 50 ms" , "Between 50 to 100 ms" ,
"Between 100 to 250 ms" , "Between 250 to 500 ms " and " > 500 ms"

you can use

 <option name="charting.fieldColors">{"<50 ms":0x00ff00,"Between 50 to 100 ms":0x33ff00,"Between 100 to 250 ms":0x66ff00,"Between 250 to 500 ms":0xffaa00,304:0xffff00,"> 500 ms":0xff0000}</option>
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...