Dashboards & Visualizations

Want to add color to table fields

Ashish0405
Path Finder

Hi Team,

I have added Red & Green color to Status column, I want to add the same to severity column as well.

Can some one suggest me some commands

 

I have used below commands to add color to status field.

 

<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
<format type="color" field="Status">
<colorPalette type="map">{"failed":#D93F3C,"finished":#31A35F,"Critical":#D93F3C,"Informational":#31A35F}</colorPalette>
</format>

Ashish0405_0-1748253414216.png

 

Labels (1)
0 Karma
1 Solution

kiran_panchavat
SplunkTrust
SplunkTrust

@Ashish0405 

 

kiran_panchavat_0-1748263747227.pngkiran_panchavat_1-1748263763485.png

<dashboard version="1.1">
<label>Status &amp; Severity Coloring</label>
<row>
<panel>
<title>Test Status and Severity</title>
<table>
<search>
<query>
<![CDATA[
| makeresults count=4
| streamstats count as id
| eval Status=case(id==1, "failed", id==2, "finished", id==3, "finished", 1==1, "failed")
| eval Severity=case(id==1, "Critical", id==2, "Informational", id==3, "Critical", 1==1, "Informational")
]]>
</query>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
<format type="color" field="Status">
<colorPalette type="map">{&quot;failed&quot;:&quot;#D93F3C&quot;,&quot;finished&quot;:&quot;#31A35F&quot;}</colorPalette>
</format>
<format type="color" field="Severity">
<colorPalette type="map">{&quot;Critical&quot;:&quot;#D93F3C&quot;,&quot;Informational&quot;:&quot;#31A35F&quot;}</colorPalette>
</format>
</table>
</panel>
</row>
</dashboard>
Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!

View solution in original post

0 Karma

Ashish0405
Path Finder

Thank you that's worked

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Ashish0405 ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @Ashish0405 

Just add another <format> under the existing one such as:

        <format type="color" field="Severity">
          <colorPalette type="map">{"Critical":#D93F3C,"Informational":#31A35F}</colorPalette>
        </format>

livehybrid_0-1748275483182.png

 

Full example:

<dashboard version="1.1">
  <label>Demo</label>
  <row>
    <panel>
      <table>
        <search>
          <query>|makeresults | eval Status="failed", Severity="Critical"
| append [makeresults | eval Status="finished", Severity="Informational"]</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
        <format type="color" field="Status">
          <colorPalette type="map">{"failed":#D93F3C,"finished":#31A35F,"Critical":#D93F3C,"Informational":#31A35F}</colorPalette>
        </format>
        <format type="color" field="Severity">
          <colorPalette type="map">{"Critical":#D93F3C,"Informational":#31A35F}</colorPalette>
        </format>
      </table>
    </panel>
  </row>
</dashboard>

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

Edit - Sorry just seen the other replies which I hadnt noticed before, not meaning to step on others toes! 

0 Karma

kiran_panchavat
SplunkTrust
SplunkTrust

@Ashish0405 

 

kiran_panchavat_0-1748263747227.pngkiran_panchavat_1-1748263763485.png

<dashboard version="1.1">
<label>Status &amp; Severity Coloring</label>
<row>
<panel>
<title>Test Status and Severity</title>
<table>
<search>
<query>
<![CDATA[
| makeresults count=4
| streamstats count as id
| eval Status=case(id==1, "failed", id==2, "finished", id==3, "finished", 1==1, "failed")
| eval Severity=case(id==1, "Critical", id==2, "Informational", id==3, "Critical", 1==1, "Informational")
]]>
</query>
</search>
<option name="drilldown">none</option>
<option name="refresh.display">progressbar</option>
<format type="color" field="Status">
<colorPalette type="map">{&quot;failed&quot;:&quot;#D93F3C&quot;,&quot;finished&quot;:&quot;#31A35F&quot;}</colorPalette>
</format>
<format type="color" field="Severity">
<colorPalette type="map">{&quot;Critical&quot;:&quot;#D93F3C&quot;,&quot;Informational&quot;:&quot;#31A35F&quot;}</colorPalette>
</format>
</table>
</panel>
</row>
</dashboard>
Did this help? If yes, please consider giving kudos, marking it as the solution, or commenting for clarification — your feedback keeps the community going!
0 Karma

Ashish0405
Path Finder

Thank you, that's worked

gcusello
SplunkTrust
SplunkTrust

Hi @Ashish0405 ,

you have to follow the same process.

or copy the option 

<format type="color" field="Severity">
     <colorPalette type="map"> 
 {"failed":#D93F3C,"finished":#31A35F,"Critical":#D93F3C,"Informational":#31A35F}</colorPalette>
</format>

obviously changing the values of the Severity field.

Ciao.

Giuseppe

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...