# How to create a smart graph in Kibana

**URL:** <https://discuss.elastic.co/t/how-to-create-a-smart-graph-in-kibana/174770>\
**Category:** Kibana\
**Created:** [April 1, 2019, 11:40am UTC](https://discuss.elastic.co/t/how-to-create-a-smart-graph-in-kibana/174770 "2019-04-01T11:40:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![moshikoy](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@moshikoy](https://discuss.elastic.co/u/moshikoy)\
**Post date:** [April 1, 2019, 11:40am UTC](https://discuss.elastic.co/t/how-to-create-a-smart-graph-in-kibana/174770/1 "2019-04-01T11:40:17Z")

</div>

Hi,  
I'd like to create a vertical bar style visualization that will present data as follow

data example:  
{  
name: flow\_  
runtime:   
}

I'd like to know the deveation of the last runtime value from the selected time range median of the runtime for each flow.

In my mind I imagine a graph showing the top 10 flows with the largest deveation  
each flow will have 2 columns, one for the latest and the second for the median

Example:  
flow\_12  
Median: 45 seconds  
Latest: 6165 seconds  
...  
...  
...

Is there a way to do it in Kibana?  
I'd love hearing your suggestions

Thanks

- Mosh

---

<div class="post-metadata">

**Author:** ![moshikoy](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@moshikoy](https://discuss.elastic.co/u/moshikoy)\
**Post date:** [April 8, 2019, 11:32am UTC](https://discuss.elastic.co/t/how-to-create-a-smart-graph-in-kibana/174770/2 "2019-04-08T11:32:29Z")

</div>

UP WE GO

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [April 8, 2019, 10:47pm UTC](https://discuss.elastic.co/t/how-to-create-a-smart-graph-in-kibana/174770/3 "2019-04-08T22:47:38Z")

</div>

> [@moshikoy](#):
>
> deveation of the last runtime value

How do you know in your data what the last runtime value was? Do the documents have a time field you can use to sort the runtime values in chronological order?

If I'm thinking along the right lines, then the vertical bar chart x-axis will have a date histogram aggregation of that time field.

To show the value of the max metric in each bar, you'd have a Y-Axis metric of `max of runtime` (in my data, the field was called `metric`).

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/0/30ab4b25db3acdf246bf5c4e20258e2440d423f6.png)

To show the derivative value of the previous max run time, you'd have another Y-Axis metric of `derivative of (max of runtime)`

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

You can play with the "Metrics & Axes" controls to have one of the metrics show as a bar chart, another show as a line chart. You should probably also have a left and a right Y-Axis. A Y-Axis for each metric:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/7/17cc54e07843fd31d924f15f3a3e1bfdee667c43.png)

---

<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:** [May 6, 2019, 10:47pm UTC](https://discuss.elastic.co/t/how-to-create-a-smart-graph-in-kibana/174770/4 "2019-05-06T22:47:50Z")

</div>

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