# How to create a line (threshold/benchmark) to a vertical bar graph

**URL:** <https://discuss.elastic.co/t/how-to-create-a-line-threshold-benchmark-to-a-vertical-bar-graph/152568>\
**Category:** Kibana\
**Created:** [October 15, 2018, 11:10pm UTC](https://discuss.elastic.co/t/how-to-create-a-line-threshold-benchmark-to-a-vertical-bar-graph/152568 "2018-10-15T23:10:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter\_brv](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@peter\_brv](https://discuss.elastic.co/u/peter_brv)\
**Post date:** [October 15, 2018, 11:10pm UTC](https://discuss.elastic.co/t/how-to-create-a-line-threshold-benchmark-to-a-vertical-bar-graph/152568/1 "2018-10-15T23:10:00Z")

</div>

Hello,  
I am stuck on my project.  
I need to find a way to create a simple horisontal line (threshold/benchmark) on my vertical bar chart.  
I can't seem to find a solution.  
Please help

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [October 15, 2018, 11:25pm UTC](https://discuss.elastic.co/t/how-to-create-a-line-threshold-benchmark-to-a-vertical-bar-graph/152568/2 "2018-10-15T23:25:24Z")

</div>

Hey Peter,

Which visualization builder are you using? With a line chart you can create a scripted field set to a static value and plot it. With timelion you can use the .static function.

---

<div class="post-metadata">

**Author:** ![peter\_brv](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@peter\_brv](https://discuss.elastic.co/u/peter_brv)\
**Post date:** [October 15, 2018, 11:45pm UTC](https://discuss.elastic.co/t/how-to-create-a-line-threshold-benchmark-to-a-vertical-bar-graph/152568/3 "2018-10-15T23:45:17Z")

</div>

Hey,  
I am using basic chart (vertical bar)  
Can you tell me a bit more about it?

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [October 17, 2018, 10:45pm UTC](https://discuss.elastic.co/t/how-to-create-a-line-threshold-benchmark-to-a-vertical-bar-graph/152568/4 "2018-10-17T22:45:29Z")

</div>

Sure, if you go to management -\> index pattern -\> select index -\> and click on scripted fields

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/8/4882641de64ccafab5a5634c7ebd3f4f2a7844c1.png)

This will create a field that will always return 10. Adding it as a metric to our visualization will give us a fixed bar. Then we need to change it to a line:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/4/64310d8f389d531f5678f249b11c9b9fdad5870f.jpeg)

---

<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:** [November 14, 2018, 10:45pm UTC](https://discuss.elastic.co/t/how-to-create-a-line-threshold-benchmark-to-a-vertical-bar-graph/152568/5 "2018-11-14T22:45:30Z")

</div>

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