Splunk Search

How to use fieldcolors

ericvdhout
Path Finder

Hi,

 

In one of my graphs I try to fixate the areacolors to red and green. However, I can't figure out how.

Tried this:

 

 

 

"visualizations": {
		"viz_CgGpI6E0": {
			"type": "splunk.area",
			"dataSources": {
				"primary": "ds_aNB3d69r_ds_d4nLznpt"
			},
			"title": "Nanoservice request results",
			"options": {
				"stackMode": "stacked100"
			},
			"fieldColors": {
				"OKPerc": "#42663a",
				"ErrorPerc": "#7a1709"
			},
			"showProgressBar": false,
			"showLastUpdated": false
		},
		"viz_r9Pd57Q4": {
			"type": "splunk.markdown",
			"options": {
				"markdown": ""
			}
		}
	},

 

Also tried placing them inside the "Options" object.

	"visualizations": {
		"viz_CgGpI6E0": {
			"type": "splunk.area",
			"dataSources": {
				"primary": "ds_aNB3d69r_ds_d4nLznpt"
			},
			"title": "Nanoservice request results",
			"options": {
				"stackMode": "stacked100",
				"fieldColors": {
					"OKPerc": "#42663a",
					"ErrorPerc": "#7a1709"
				}
			},
			"showProgressBar": false,
			"showLastUpdated": false
		},
	},

 

But the colors stay wrong. Am I doing it wrong?

Current graph: 

ericvdhout_0-1652104750371.png

Purple should be green and blue should be red.

Cheers,

Labels (1)
0 Karma
1 Solution

ericvdhout
Path Finder

No idea what FieldColors does, but SeriesColors seems to be my friend.

 

 

 

		"viz_CgGpI6E0": {
			"type": "splunk.area",
			"dataSources": {
				"primary": "ds_aNB3d69r_ds_d4nLznpt"
			},
			"title": "Nanoservice request results",
			"options": {
				"stackMode": "stacked100",
				"seriesColors": "[#42663a,#7a1709]"
			},
			"showProgressBar": false,
			"showLastUpdated": false
		}

ericvdhout_0-1652106116022.png

 

View solution in original post

0 Karma

ericvdhout
Path Finder

No idea what FieldColors does, but SeriesColors seems to be my friend.

 

 

 

		"viz_CgGpI6E0": {
			"type": "splunk.area",
			"dataSources": {
				"primary": "ds_aNB3d69r_ds_d4nLznpt"
			},
			"title": "Nanoservice request results",
			"options": {
				"stackMode": "stacked100",
				"seriesColors": "[#42663a,#7a1709]"
			},
			"showProgressBar": false,
			"showLastUpdated": false
		}

ericvdhout_0-1652106116022.png

 

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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...