Dashboards & Visualizations

Specifying colors for my Column Graph based on it's value(s)

maverick
Splunk Employee
Splunk Employee

Hi Splunk Reporting Gurus,

Couple questions I'm wondering about:

1) Regarding the various columns in a column graph, is it possible to specify which colors are used for each column (attribute) or is that always automatic?

2) More specifically, can I configure a report to have different shades of green used for columns that are "greater than" a given number, and then have other columns be different shades of red if they are "less then" that given number?

Anyone done this type of reporting before?

Dan
Splunk Employee
Splunk Employee

In 4.2 you can now do field based coloring, which looks like this:

field1:0xFF0000, field2:0x00FF00, field3:0x0000FF

You cannot do any value based color assignments. The best you can do is formulate a search to rename fields that are above or below a certain value to something like "hi1", "hi2", "lo1", lo2", then assign colors to those fields as shown above.

(Credit to Jason Gatt)

0 Karma

Ant1D
Motivator

Hi,

For your first question, you can control the colors of column chart cells. The colors used for cells will be in the order of the field values seen in your chart legend. In advanced XML inside your HiddenChartFormatter module, you will need to add the following param: <param name="charting.seriesColors">[0xCC0000,0x00CC00]</param>

In the above example, if you had a column chart with two cells, the first cell named Fail and the second named Pass, then the first hex value will make the Fail cell color Red and the pass cell color will be Green.

I am not sure about your second question. If this is possible, it would be very useful. I will look into it.

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 ...