Dashboards & Visualizations

How to have different colour scales for single values in trellis?

New Member

I have a dashboard showing a number of single values in trellis. I know how to format a single colour scale for all values but each value in trellis needs it's own scale in this case.

So how do I have independently chosen colout format scales for my single value fields?

I there an app that does this or do I need to customise the source code?

0 Karma

SplunkTrust
SplunkTrust

If every individual single value panels need there own scale then you are better off writing separate Single Values instead of Trellis.

If there are set of Single Values that have common color scales you can group those single values together in Trellis. However, you may have to create multiple Trellis which may not align properly.

If you are not showing trending information in the single value you have multiple options which are referenced in one of the answers below. But they still would not use trellis: https://answers.splunk.com/answers/765472/single-value-visualization-set-value-to-always-hav.html

The 3rd option with Single value with JS to override color is what you need to adopt but JS would need to be changed as per Trellis which will have several Single Value views.

3) Use Simple XML JS extension to override Single Value color on render (you would need to know JavaScript to handle text values). Refer to one of the older answers which is based on numeric value but can be changed as per text as well. https://answers.splunk.com/answers/659702/how-to-configure-single-value-dashboard-color-base.html

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

New Member

Please try this example dashboard to get the different color range for trellis

Trellis with Color By String Value

 <panel>
   <viz type="status_indicator_app.status_indicator">
     <search>
       <query>| makeresults

| eval data="ACTIVITY=ALIVE,CREDITOFFICER=DEAD,X=ALIVE,Y=DEAD"
| makemv data delim=","
| mvexpand data
| rename data as _raw
| KV
| fields - _*
| stats values(*) as *
| transpose column
name="field"
| rename "row 1" as value
| stats last(value) as value by field
| foreach * [eval icon=if('<>'=="ALIVE","check-circle","times-circle"), color=if('<>'=="ALIVE","green","red")]
| stats last(value) as value last(icon) as icon last(color) as color by field
-24h@h
now
1

none
fieldvalue
<option name="status
indicatorapp.statusindicator.fillTarget">background
warning
fieldvalue
<option name="status
indicatorapp.statusindicator.precision">0
1
#555
true
true
1
1
small
component

0 Karma

SplunkTrust
SplunkTrust

If Status Indicator with Trellis is the option applicable to you following is my answer with the run anywhere example that @harish_I is referring to: https://answers.splunk.com/answers/670058/how-can-i-get-colors-into-trellis-for-values-that.html

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