Dashboards & Visualizations

Modifying pie chart colors in dashboard studio?

satish
Explorer

Hi Experts,

Im unable to find modify the pie chart colors using dashboard studio.  I have tried to add field colors under options in dashboard studio. Unable to edit for specific visualisation in the source code field.  

Have a field called "supp_type", I was looking for pie chart to be green for value "current", Amber for "previous" and red for "old". 

When I include the charting.fieldcolors it doesn't accept  or doesn't allow to save the panel code.

Can you help me in adding that custom colors into dashboard studio.  

Query:
-------------
index=lab host=hmclab 
| spath path=hmc_info{} output=LIST
| mvexpand LIST
| spath input=LIST
| where category == "hmc"
| search hmc_version=V* OR hmc_version=unknown
| dedup hmc_name
| eval supp_type=case(match(hmc_version,"^V10.*|^V9R2.*"), "current", match(hmc_version, "^V9R1.*"), "previous", match(hmc_version, "^V8.*|^V7.*"), "old")
| chart count by supp_type useother=false

Source Code from dashboard studio: 
------------------------------------------------------
{
"type": "viz.pie",
"dataSources": {
"primary": "ds_RxEsq1cK"
},
"title": "HMC Versions",
"options": {
"chart.showPercent": true,
"backgroundColor": "transparent",
"charting.fieldColors": {"current":0x008000, "previous":0xffff00, "old":0xff0000}
},
"context": {},
"showProgressBar": false,
"showLastUpdated": false
}
Labels (3)
Tags (2)
0 Karma
1 Solution

satish
Explorer

I have tried to add the below the option under the panel. It seems to have worked. 

 

"seriesColors": ["#61A84F","#FFBF00", "#FF0000"]

View solution in original post

0 Karma

satish
Explorer

I have tried to add the below the option under the panel. It seems to have worked. 

 

"seriesColors": ["#61A84F","#FFBF00", "#FF0000"]
0 Karma
Get Updates on the Splunk Community!

Splunk Lantern | Spotlight on Security: Adoption Motions, War Stories, and More

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...

Splunk Cloud | Empowering Splunk Administrators with Admin Config Service (ACS)

Greetings, Splunk Cloud Admins and Splunk enthusiasts! The Admin Configuration Service (ACS) team is excited ...

Tech Talk | One Log to Rule Them All

One log to rule them all: how you can centralize your troubleshooting with Splunk logs We know how important ...