Splunk Search

How to set the Background Color of a Chart?

SwatiApte
Path Finder

Hi,

We want to represent two Criticality Zones for an attribute on a Chart. Based on a Critical Threshold Series (we are calling it a Series because the values of Critical Threshold varies all throughout the Day), there should be two Criticality Zones on the Chart:

  1. Normal Zone - The entire area below the Critical Threshold Series should be Normal Zone (denoted by a Green colour)
  2. Critical Zone - The entire area above the Critical Threshold Series should be Critical Zone (denoted by a Red colour)

To handle the above mentioned scenario, we want to set the Background Colour of the Chart to Red, and super-impose the Green Zone on it. We tried setting the Background Colour using the charting.backgroundColor option, but that colours the entire Chart component (including Legends and Labels), instead of just the actual Charting area.

Could you please let us know how to set the Background Colour for just the Chart Area.

thirumalreddyb
Communicator

You need to write custom javascript that does the trick for you. I hope you are doing this in webframework and hence you can include your js within the page and read the value from the javascript and then based on the value, you can set it to either green or red.

0 Karma

AditiKulkarni
New Member

Does anyone has any idea about this?

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...