Dashboards & Visualizations
Highlighted

Change background color of a single value panel based on value

Communicator

hi! I have several single value panels and I want for each panel's background color to change based on its value. the values are different for various panels. is there a way to do this using search, simple XML or custom CSS?

I've tried applying some suggestions I saw from previously asked questions regarding this topic, but those does not seem to work for my usecase. Or maybe I just overlooked something?

thank you so much.

0 Karma
Highlighted

Re: Change background color of a single value panel based on value

Ultra Champion

Which suggestions did you try so far? As far as I know you can simply do this by going into edit mode on the dashboard, open up the format settings for that particular single value panel and set the color settings (you can choose whether to color the value or the background).

0 Karma
Highlighted

Re: Change background color of a single value panel based on value

Communicator

i tried using customization using css and simple xml. but this does not seem to work for me. But is there a way that I can do this using search, that instead of manually setting it using the format visualization option, it will automatically change when a certain condition is met or not?

0 Karma
Highlighted

Re: Change background color of a single value panel based on value

Is this what you want
alt text
or you value is some string and not int

0 Karma
Highlighted

Re: Change background color of a single value panel based on value

Legend

@mdmaala If you use colorMode as block this should be possible out of the box directly from the UI as per the screenshot shared by @paramagurukarthikeyan . You need to choose the second radio for Color Mode.

No CSS or JS required. Unless you have a complicated requirement for which you need to provide more details, for us to assist you better.




| eval message="Happy Splunking!!!"


0 Karma
Highlighted

Re: Change background color of a single value panel based on value

Communicator

hi! sorry for the late reply. for now I just used this, but what I really wanted is by creating a conditional search then based on the result the background color of the single value panel changes.

0 Karma
Highlighted

Re: Change background color of a single value panel based on value

Communicator

I did that already, but what I am tying to do, is creating a conditional search then depending on the result, the background color of the single value panel changes.

0 Karma
Highlighted

Re: Change background color of a single value panel based on value

Communicator

but thank you so much for all the help!

0 Karma