# Get single figure shows in Timelion using simple visualization

**URL:** <https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [July 8, 2020, 2:40pm UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370 "2020-07-08T14:40:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![isharamadhawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/isharamadhawa/32/68006_2.png) [@isharamadhawa](https://discuss.elastic.co/u/isharamadhawa)\
**Post date:** [July 8, 2020, 2:40pm UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370/1 "2020-07-08T14:40:00Z")

</div>

I have created a visualization to obtain average TPS for my application using Timelion.

 ![timelion](https://us1.discourse-cdn.com/elastic/original/3X/c/0/c0e90708dde2e69dcf3db2e32a9e45ea5826df73.png)

Here you can see some straight lines that indicates average TPS for given time period.

Timelion expression is as follows:

`.es(index=t*, timefield='@timestamp').aggregate(avg).scale_interval(1s).label('Average Total TPS').color('blue')`

What I want is getting same figure using a simple visualization like metric. No need to use a straight line as above.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [July 8, 2020, 8:53pm UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370/2 "2020-07-08T20:53:52Z")

</div>

Hi @isharamadhawa. I created something similar using Metricbeat in the screenshot below. I hope this helps.

 ![Screen Shot 2020-07-08 at 1.52.27 PM](https://us1.discourse-cdn.com/elastic/original/3X/9/3/938be486fad996498ee3202a5ebf8b8b3371b6f3.png)

---

<div class="post-metadata">

**Author:** ![isharamadhawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/isharamadhawa/32/68006_2.png) [@isharamadhawa](https://discuss.elastic.co/u/isharamadhawa)\
**Post date:** [July 9, 2020, 3:04am UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370/3 "2020-07-09T03:04:43Z")

</div>

I tried this even before posting this question. I can't generate this as I receive shard failure error. Result shows is incorrect as well. Also time interval should be second as well. But I can generate data in Timelion without any issue. Is there any visualization that I can use timelion expression or something similar to get that data as a single figure?

 ![Screenshot from 2020-07-09 08-28-02](https://us1.discourse-cdn.com/elastic/original/3X/c/f/cfbffc97f2a59be9b3dbe0c88b1e2e183015b318.png)

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [July 9, 2020, 6:21pm UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370/4 "2020-07-09T18:21:56Z")

</div>

Hi @isharamadhawa. What is your date range set to? Scaling a large date range over the seconds interval is probably causing the shard failure.

If you absolutely must have seconds as an interval over a large date range, you may need to scale up your Elasticsearch cluster. This might mean adding more nodes or increasing system resources.

The [Designing for Scale chapter](https://www.elastic.co/guide/en/elasticsearch/guide/current/scale.html) in the Elasticsearch Definitive Guide may be useful.

---

<div class="post-metadata">

**Author:** ![isharamadhawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/isharamadhawa/32/68006_2.png) [@isharamadhawa](https://discuss.elastic.co/u/isharamadhawa)\
**Post date:** [July 10, 2020, 5:30am UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370/5 "2020-07-10T05:30:13Z")

</div>

Hi @nickpeihl,  
I selected a large data range. This works fine in Timelion visualization. Why can't we get it worked in a simple visualization?  
I think this is a very fundamental visualization. We have to divide total count from total number of seconds of the selected date range.

Is there any workaround that I can apply Timelion expression to another visualization. Or any other way that I can achieve this?  
Thank you

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [July 13, 2020, 4:17pm UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370/6 "2020-07-13T16:17:40Z")

</div>

Hi @isharamadhawa

> I selected a large data range. This works fine in Timelion visualization. Why can't we get it worked in a simple visualization?  
> I think this is a very fundamental visualization. We have to divide total count from total number of seconds of the selected date range.

Sorry, I previously misunderstood the issue. I believe you can replicate this by enabling the "Scale Metric Values" option in the Advanced options. This setting [appears to be deprecated](https://github.com/elastic/kibana/pull/47599) in the current release, but it should work until Kibana v8.0 is released.

 ![Screen Shot 2020-07-13 at 9.13.27 AM](https://us1.discourse-cdn.com/elastic/original/3X/e/3/e3b9429ac762cb3a2f6d583ad2b4fff18692df07.png)

> Is there any workaround that I can apply Timelion expression to another visualization. Or any other way that I can achieve this?

Unfortunately, no. Timelion expressions are unique to timelion only.

---

<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:** [August 10, 2020, 4:17pm UTC](https://discuss.elastic.co/t/get-single-figure-shows-in-timelion-using-simple-visualization/240370/7 "2020-08-10T16:17:46Z")

</div>

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