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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...