Dashboards & Visualizations

How can I change the color of the Single value visualization?

stardust927
Explorer

alt text

*field A is something's value, and B is its "standard deviation"

If I make a table chart like this, and want to change this form to "single value", it will came out like this.
alt text

The problem is setting the colors.

I want to make colors like this.
If field "B" is from 0 to 10, the values(field A) getting Green color.
If field "B" is from 10 to 20 the values(field A) getting Green yellow.
If field "B" is from 20 to 30, the values(field A) getting Orange.
If field "B" is from 30 to 40, the values(field A) getting Red.

But when I tried to use "single value" option, the "color option's values" are following "field A's value"

I wondering if changing Dashboard Source, make it possible to change color by field B.

    <panel>
      <single>
        <title>EXAMPLE</title>
        <search base="test">
          <query>|example </query>
        </search>
        <option name="colorBy">value</option>
        <option name="drilldown">all</option>
        <option name="numberPrecision">0</option>
        <option name="rangeValues">[0,10,25,40]</option>
        <option name="trendDisplayMode">percent</option>
        <option name="trendInterval">-5m</option>
        <option name="unit">count</option>
        <option name="useColors">1</option>
      </single>
    </panel>

This is single value's option at Dashboard Source.

So, can it be possible to change color like this way?

1 Solution

niketn
Legend

@stardust927, you can use Status Indicator Custom Visualization to show a different value for display and color/icon by a different value. However, you will not have trendline as available in Single Value.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@stardust927, you can use Status Indicator Custom Visualization to show a different value for display and color/icon by a different value. However, you will not have trendline as available in Single Value.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

DalJeanis
Legend

You need to add lines to specify the colors and number ranges...

<option name="rangeColors">["0x008000","0xffff00","0xff6600","0xff0000"]</option>
<option name="rangeValues">[10,20,30]</option>

The above can be changed to your preferences for hex representations of the colors you want.

0 Karma

stardust927
Explorer

I want t show the field A's value, and I want to set colors by field B's value ...

If I change rangeValues, and rangeColors number, it follows field A's value...

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...