# \[Kibana timelion\] Error in the continuation of the trend in the future (fit function)

**URL:** <https://discuss.elastic.co/t/kibana-timelion-error-in-the-continuation-of-the-trend-in-the-future-fit-function/313968>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [September 8, 2022, 8:52am UTC](https://discuss.elastic.co/t/kibana-timelion-error-in-the-continuation-of-the-trend-in-the-future-fit-function/313968 "2022-09-08T08:52:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniele.saccon](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@daniele.saccon](https://discuss.elastic.co/u/daniele.saccon)\
**Post date:** [September 8, 2022, 8:52am UTC](https://discuss.elastic.co/t/kibana-timelion-error-in-the-continuation-of-the-trend-in-the-future-fit-function/313968/1 "2022-09-08T08:52:32Z")

</div>

Hi,

I am trying to create a timelion chart with the aim of plotting the trend over time of my **size** field.  
I would like the line to continue in the future with the latest available data after today's date.

I am using version 8.1.3  
This is my timelion expression:  
`.es(index=my_index, q=field:value, metric=sum:size, timefield=timestamp).fit(nearest).label(size).divide(1024).precision(3)`

In version 5.4.0 my graph worked with this expression.

This is the current result:

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

Thanks

Daniele

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [September 9, 2022, 8:32pm UTC](https://discuss.elastic.co/t/kibana-timelion-error-in-the-continuation-of-the-trend-in-the-future-fit-function/313968/2 "2022-09-09T20:32:04Z")

</div>

@Stratoula_Kalafateli can we please get some help?

Thanks,  
Bhavya

---

<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:** [October 7, 2022, 8:32pm UTC](https://discuss.elastic.co/t/kibana-timelion-error-in-the-continuation-of-the-trend-in-the-future-fit-function/313968/3 "2022-10-07T20:32:11Z")

</div>

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