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!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...