# Plot maximum value within time range with Timelion

**URL:** https://discuss.elastic.co/t/plot-maximum-value-within-time-range-with-timelion/58991
**Category:** Kibana
**Tags:** timelion
**Created:** [August 25, 2016, 11:54pm UTC](https://discuss.elastic.co/t/plot-maximum-value-within-time-range-with-timelion/58991 "2016-08-25T23:54:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![j9s3](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@j9s3](https://discuss.elastic.co/u/j9s3)
#### Post date: [August 25, 2016, 11:54pm UTC](https://discuss.elastic.co/t/plot-maximum-value-within-time-range-with-timelion/58991/1 "2016-08-25T23:54:37Z")

</div>

With Timelion, is there a way to dynamically plot the maximum value of a series within a given timezone?

For example, say I have plotted a series with this data:  
08/01 - 20  
08/02 - 30  
08/03 - 32  
08/04 -20

On the same chart, I would want a line with the max (32) spanning across the chart.

I would want this max to be dynamically charted as the values or my datetime range changes. Is this possible with the current functions?

---

<div class="post-metadata">

### Author: ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)
#### Post date: [August 26, 2016, 10:58pm UTC](https://discuss.elastic.co/t/plot-maximum-value-within-time-range-with-timelion/58991/2 "2016-08-26T22:58:58Z")

</div>

Hey Jay,

This does not appear to available, though you are welcome to open an issue for it.

> **[elastic/timelion](https://github.com/elastic/timelion/issues)**
>
> timelion - Timelion was absorbed into Kibana 5. Don't use this. Time series composer for Elasticsearch and beyond.

---

<div class="post-metadata">

### Author: ![Charlotte\_EGM](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charlotte_egm/32/13503_2.png) [@Charlotte\_EGM](https://discuss.elastic.co/u/Charlotte_EGM)
#### Post date: [June 14, 2017, 2:17pm UTC](https://discuss.elastic.co/t/plot-maximum-value-within-time-range-with-timelion/58991/3 "2017-06-14T14:17:50Z")

</div>

You can do it with mathlion plugin.  
You can then ask to parse a mathematical function 'max' on all your data.  
[http://mathlion.docs.fermiumlabs.com/en/latest/](http://mathlion.docs.fermiumlabs.com/en/latest/)  
it would look like this :

> .es().math("max(source)")

---

<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 4, 2022, 4:27am UTC](https://discuss.elastic.co/t/plot-maximum-value-within-time-range-with-timelion/58991/4 "2022-11-04T04:27:08Z")

</div>


