Splunk Enterprise

Need assistance with filling column values with colors

sdkp03
Communicator

My Splunk query: index=aaa sourcetype="bbb" | bucket _time span=1d|stats count by data_date,Name,RecordCount limit=0| lookup abc.csv Names as Name|eventstats sum(RecordCount) as Total by Name, _time|eval p=round((Total/Threshold)*100,2)|chart values(p) over Name BY data_date limit=0

 

data_date and _time represent same day(value) in yyyy-mm-dd format. abc.csv has list of all Names and associated threshold values stored.

When I select time picker as last 7 days and use below setting in xml, displays table as expected. Can someone please help me in extending this coloring to all columns, considering that this date value(column header value) changes whenever user changes value in datapicker. 

<format type="color" field="25-03-2023">

   <colorpalette type="list">[#FF0000,#FFF000,#55C169,#55C169]</colorpalette >

    <scale type="threshold">90,95,100</scale>

</format>

Labels (1)
Tags (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

Remove the "field=..." and then the colorPalette will apply to all fields.

Add a second definition AFTER that definition for the Name field like

        <format type="color" field="Name">
          <colorPalette type="list">[#FFFFFF]</colorPalette>
        </format>

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

Remove the "field=..." and then the colorPalette will apply to all fields.

Add a second definition AFTER that definition for the Name field like

        <format type="color" field="Name">
          <colorPalette type="list">[#FFFFFF]</colorPalette>
        </format>

sdkp03
Communicator

Perfect, works like a charm 😄

Just one last question, is there a way I can hide numbers/values from being displayed / in other words change font color to be same as the background color!

Thanks,
Sowmya

0 Karma

bowesmana
SplunkTrust
SplunkTrust

You probably can in CSS in tables. In charts you can also with CSS

0 Karma
Get Updates on the Splunk Community!

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...