Dashboards & Visualizations

Changing colors in Dashboard Studio

splunkbeast
New Member

Hello Splunk Champs 

I am trying to do something in studio and stuck with something  

If you see the picture, is it possible to change the color of boxes as per the status . like if status icon(snall circle) is green then the background color should be white and same for other services as per picture . 

splunkbeast_1-1764843580027.png

 

 

Labels (1)
0 Karma

forecastingLogs
Splunk Employee
Splunk Employee

What you can do is add the same data source for either image, and changes the color values accordingly, for example: 

{
    "title": "draw",
    "description": "",
    "inputs": {
        "input_global_trp": {
            "options": {
                "defaultValue": "-24h@h,now",
                "token": "global_time"
            },
            "title": "Global Time Range",
            "type": "input.timerange"
        }
    },
    "defaults": {
        "dataSources": {
            "ds.o11y": {
                "options": {
                    "queryParameters": {
                        "earliest": "$global_time.earliest$",
                        "latest": "$global_time.latest$"
                    }
                }
            },
            "ds.search": {
                "options": {
                    "queryParameters": {
                        "earliest": "$global_time.earliest$",
                        "latest": "$global_time.latest$"
                    }
                }
            }
        },
        "visualizations": {
            "global": {
                "showProgressBar": true
            }
        }
    },
    "visualizations": {
        "viz_OpC1vLYF": {
            "context": {
                "fillColorEditorConfig": [
                    {
                        "to": 5,
                        "value": "#000000"
                    },
                    {
                        "from": 5,
                        "value": "#ffffff"
                    }
                ],
                "fillDataValue": "> primary | seriesByType(\"number\") | lastPoint()"
            },
            "dataSources": {
                "primary": "ds_FPMB4FhR"
            },
            "options": {
                "fillColor": "> fillDataValue | rangeValue(fillColorEditorConfig)"
            },
            "type": "splunk.rectangle"
        },
        "viz_ksk466cv": {
            "context": {
                "fillColorEditorConfig": [
                    {
                        "to": 5,
                        "value": "#D41F1F"
                    },
                    {
                        "from": 5,
                        "value": "#118832"
                    }
                ],
                "fillDataValue": "> primary | seriesByType(\"number\") | lastPoint()"
            },
            "dataSources": {
                "primary": "ds_FPMB4FhR"
            },
            "eventHandlers": [
                {
                    "options": {
                        "tokens": [
                            {
                                "key": "row.<fieldname>.value",
                                "token": "value"
                            }
                        ]
                    },
                    "type": "drilldown.setToken"
                }
            ],
            "options": {
                "fillColor": "> fillDataValue | rangeValue(fillColorEditorConfig)"
            },
            "type": "splunk.ellipse"
        }
    },
    "dataSources": {
        "ds_FPMB4FhR": {
            "name": "Search_2",
            "options": {
                "query": "| makeresults count=1\n| eval rand=random()%10+1\n| table rand"
            },
            "type": "ds.search"
        },
        "ds_LuczsK7H": {
            "name": "Search_1",
            "options": {
                "query": "|  makeresults count=1\n| eval test=$rand$\n| table test"
            },
            "type": "ds.search"
        }
    },
    "layout": {
        "globalInputs": [
            "input_global_trp"
        ],
        "layoutDefinitions": {
            "layout_1": {
                "options": {
                    "display": "auto",
                    "height": 960,
                    "width": 1440
                },
                "structure": [
                    {
                        "item": "viz_OpC1vLYF",
                        "position": {
                            "h": 270,
                            "w": 240,
                            "x": 550,
                            "y": 50
                        },
                        "type": "block"
                    },
                    {
                        "item": "viz_ksk466cv",
                        "position": {
                            "h": 150,
                            "w": 160,
                            "x": 590,
                            "y": 130
                        },
                        "type": "block"
                    }
                ],
                "type": "absolute"
            }
        },
        "options": {},
        "tabs": {
            "items": [
                {
                    "label": "New tab",
                    "layoutId": "layout_1"
                }
            ]
        }
    }
}
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!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...