# Color coded conditional formatting for rows in tables

**URL:** <https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701>\
**Category:** Kibana\
**Created:** [May 31, 2017, 9:26am UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701 "2017-05-31T09:26:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NandhaKrishna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandhakrishna/32/26286_2.png) [@NandhaKrishna](https://discuss.elastic.co/u/NandhaKrishna)\
**Post date:** [May 31, 2017, 9:26am UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701/1 "2017-05-31T09:26:01Z")

</div>

Hi,  
Is this enhancement done? I want to color the rows according to a condition if the data in the other row is Y then the row should be green else it should be red.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 31, 2017, 9:47am UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701/2 "2017-05-31T09:47:42Z")

</div>

Hi @NandhaKrishna,

coloring the full row is not supported right now. Conditional per-field coloring can be achieved via the field formatters.

---

<div class="post-metadata">

**Author:** ![NandhaKrishna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandhakrishna/32/26286_2.png) [@NandhaKrishna](https://discuss.elastic.co/u/NandhaKrishna)\
**Post date:** [May 31, 2017, 9:59am UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701/3 "2017-05-31T09:59:55Z")

</div>

Thank you for the quick reply. Where can I read about Field formatters? Is there any code for that. I'm trying to modify data table plugin to color only one row and not the full row. Sorry if my description confused you.

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 31, 2017, 10:40am UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701/4 "2017-05-31T10:40:41Z")

</div>

I suspect you mean columns instead of rows, right? Maybe looking at [the source](https://github.com/elastic/kibana/blob/3eeecb73818ff873aedcbf02f2d1ccc921098428/src/ui/public/stringify/types/color.js) of the color field formatter can give you an inspiration for your plugin. I don't think that formatting one field depending on the value of another is easily implementable right now though.

---

<div class="post-metadata">

**Author:** ![NandhaKrishna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandhakrishna/32/26286_2.png) [@NandhaKrishna](https://discuss.elastic.co/u/NandhaKrishna)\
**Post date:** [May 31, 2017, 10:48am UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701/5 "2017-05-31T10:48:56Z")

</div>

Yeah a columns instead of rows. And yeah thanks for that link I'll look into it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 28, 2017, 10:49am UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701/6 "2017-06-28T10:49:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [February 22, 2018, 2:41pm UTC](https://discuss.elastic.co/t/color-coded-conditional-formatting-for-rows-in-tables/87701/7 "2018-02-22T14:41:51Z")

</div>

Not sure if this helps, but the Metric visualization has this feature now. In this case I've set ranges and colors are applied to the values;

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/5/95ffdbd445ab38b5812ae1d4a0aacc7b9fa6b15b.png)
