Splunk Search

How to change colors in a table?

shruthiangadi
Explorer

Hi ,

I have a statistics table in which each column contains different value for eg:

Application Name Application ID Functional Fitness Digital Fitness
A 123 0.2 0.5
B 456 3 5
C 789 1 1.5

So now i want to change the color of the value present in functional fitness and digital fitness based on the range, if the range is from 0 to 0.5 -- green colour, 0.6 to 3 --- red colour, 3.5 to 5 --- yellow colour

So can you please help me in changing the colour of the value present in each column based on the range.

Tags (2)
0 Karma

to4kawa
Ultra Champion

table color

hi, how about this

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Yes @to4kawa , this is the same what I said. LOL 😛

0 Karma

to4kawa
Ultra Champion

wow, That's right 🙂
just in case,

yellow #ffff00
red #ff0000
green #00ff00
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@shruthiangadi

You can format table cell. Refer : https://docs.splunk.com/Documentation/Splunk/7.3.1/Viz/TableFormatsXML#Table_format_source_code_exam...

Here is sample dashboard.

<dashboard>
  <label>Table Cell Color</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults 
| eval _raw="
Application_Name,Application_ID,Functional_Fitness,Digital_Fitness
A,123,0.2,0.5
B,456,3,5
C,789,1,1.5" | multikv forceheader=1 | table Application_Name,Application_ID,Functional_Fitness,Digital_Fitness</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <format type="color" field="Functional_Fitness">
          <colorPalette type="list">[#53A051,#DC4E41,#F8BE34]</colorPalette>
          <scale type="threshold">0.6,3.5</scale>
        </format>
        <format type="color" field="Digital_Fitness">
          <colorPalette type="list">[#53A051,#DC4E41,#F8BE34]</colorPalette>
          <scale type="threshold">0.6,3.5</scale>
        </format>
      </table>
    </panel>
  </row>
</dashboard>
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 ...