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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...