Conditional color change in Metric Widget


(Shailesh Vaidya) #1

Hello,

Can we have conditional color change in Metric widget. My use case is, I have result field which can be either Success or Failure. I want to show it in Green when its Success and in Red when it failure. Also please let me know if there is any other visualization type which I can use.


Metric visualization conditional color change
Line chart color change
(Lee Drengenberg) #2

For numeric values you can use this. The Metric visualization has this feature now. In this case I've set ranges and colors are applied to the values;

But I think you might be able to use conditional formatting for strings too. I'll check on that.


(Lee Drengenberg) #3

Here's an example where I set the conditional formatting of my @tags field so that success is green, and info is blue;

And here in Discover I can see a green success value;

And this works in at least some visualizations like this Data Table (but note that for Discover I had to set the color conditional for the analyzed @tags field and for Visualizations I had to set the same color conditional formatting on the @tags.raw field);


How To change text or numbers color conditionally in Kibana Data Table
(Shailesh Vaidya) #4

Thanks LeeDr. This looks promising. I will try with creating such visualization.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.