# Threshold coloring

**URL:** <https://discuss.elastic.co/t/threshold-coloring/116830>\
**Category:** Kibana\
**Created:** [January 24, 2018, 8:55am UTC](https://discuss.elastic.co/t/threshold-coloring/116830 "2018-01-24T08:55:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)\
**Post date:** [January 24, 2018, 8:55am UTC](https://discuss.elastic.co/t/threshold-coloring/116830/1 "2018-01-24T08:55:15Z")

</div>

Is there any way in VBTS to change the color of a line in Time Series depending on the value at the time, like one can in the metric part?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [January 24, 2018, 7:39pm UTC](https://discuss.elastic.co/t/threshold-coloring/116830/2 "2018-01-24T19:39:33Z")

</div>

You can set a threshold line, but the line doesn't change color itself. You can open an issue at [https://github.com/elastic/kibana/issues](https://github.com/elastic/kibana/issues) to track the feature request.

---

<div class="post-metadata">

**Author:** ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)\
**Post date:** [January 25, 2018, 7:52am UTC](https://discuss.elastic.co/t/threshold-coloring/116830/3 "2018-01-25T07:52:43Z")

</div>

Sorry, my bad. I don't want a threshold line, I want the graph line to change color according to a threshold value. I.E. If the value is over x, I want the line/dots to be green, if under x, they should be red.

But I solved it by using Timelion and a condition. Then I generated two lines, one green and the other red.

```
.es(index=logstash-*, metric=sum:positive).subtract(.es(index=logstash-*, metric=sum:negative)).color(#ff0000).if(operator="gt", if=0, then=null).bars(),
.es(index=logstash-*, metric=sum:positive).subtract(.es(index=logstash-*, metric=sum:negative)).color(#00ff00).if(operator="lt", if=0, then=null).bars()
```

---

<div class="post-metadata">

**Author:** ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)\
**Post date:** [January 25, 2018, 7:53am UTC](https://discuss.elastic.co/t/threshold-coloring/116830/4 "2018-01-25T07:53:44Z")

</div>

But it would be nice to have that function in VBTS for the time series and not only for the metric visualisations.

---

<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:** [February 22, 2018, 7:54am UTC](https://discuss.elastic.co/t/threshold-coloring/116830/5 "2018-02-22T07:54:28Z")

</div>

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