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!

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

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

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

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...