# How can I make a visualization where only the latest data point is a different color?

**URL:** <https://discuss.elastic.co/t/how-can-i-make-a-visualization-where-only-the-latest-data-point-is-a-different-color/277136>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [June 26, 2021, 9:13pm UTC](https://discuss.elastic.co/t/how-can-i-make-a-visualization-where-only-the-latest-data-point-is-a-different-color/277136 "2021-06-26T21:13:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackberrySherbet](https://avatars.discourse-cdn.com/v4/letter/b/7cd45c/32.png) [@blackberrySherbet](https://discuss.elastic.co/u/blackberrySherbet)\
**Post date:** [June 26, 2021, 9:13pm UTC](https://discuss.elastic.co/t/how-can-i-make-a-visualization-where-only-the-latest-data-point-is-a-different-color/277136/1 "2021-06-26T21:13:39Z")

</div>

As titled. I want to create a line graph of one metric versus another and the most recent (chronologically) must be one colour and everything else another colour. How can I do this? I'd like to avoid vega if I can.

---

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [June 27, 2021, 5:17pm UTC](https://discuss.elastic.co/t/how-can-i-make-a-visualization-where-only-the-latest-data-point-is-a-different-color/277136/2 "2021-06-27T17:17:20Z")

</div>

1. One way is to try using enhanced table.Then you can customize using CSS in settings. There is a setting called row computed CSS where you can alter your colour for the 1st row.
2. Other possible way is by trying same CSS in TSVB as well.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [June 28, 2021, 6:53pm UTC](https://discuss.elastic.co/t/how-can-i-make-a-visualization-where-only-the-latest-data-point-is-a-different-color/277136/3 "2021-06-28T18:53:59Z")

</div>

I believe Vega is the only answer to this question.

---

<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:** [July 26, 2021, 6:54pm UTC](https://discuss.elastic.co/t/how-can-i-make-a-visualization-where-only-the-latest-data-point-is-a-different-color/277136/4 "2021-07-26T18:54:45Z")

</div>

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