Dashboards & Visualizations

SingleValue for Ration: Best Option for Coloring

triest
Communicator

I'm working on a dashboard for metrics and one of the metrics is a ratio; I would like to color the ration red, yellow, or green based on percentage values.

The "easy" solution is just to display a percentage and we can easily use the interface to set threshold values for the colors. I would really like to display a ration, however.

If I use a ratio, I can calculate the percent, use rangemap to set the follow, and then classField to se the color. The problem with this approach is classField is set as deprecated. I would assume if it has been deprecated, they have thought through the use cases and have a way to display one field (the ratio) but use another (the percentage) for coloring, but I haven't figured it out yet.

0 Karma

cmerriman
Super Champion

try adding this eval (though you may need to swap the signs/order) to the end of your query:

|eval range=case(percentage>xx,"severe",percentage>xx,"elevated",percentage>xx,"low")

these colors relate to those values.
http://docs.splunk.com/Documentation/Splunk/latest/Viz/SingleValueFormatting#Migration_for_rangemap_...

and add <option name="field">ratio</option> to your options

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...