# Simple Graph creation on Kibana for year on year metrics

**URL:** <https://discuss.elastic.co/t/simple-graph-creation-on-kibana-for-year-on-year-metrics/123060>\
**Category:** Kibana\
**Created:** [March 8, 2018, 12:10pm UTC](https://discuss.elastic.co/t/simple-graph-creation-on-kibana-for-year-on-year-metrics/123060 "2018-03-08T12:10:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vijai](https://avatars.discourse-cdn.com/v4/letter/v/ed8c4c/32.png) [@Vijai](https://discuss.elastic.co/u/Vijai)\
**Post date:** [March 8, 2018, 12:10pm UTC](https://discuss.elastic.co/t/simple-graph-creation-on-kibana-for-year-on-year-metrics/123060/1 "2018-03-08T12:10:55Z")

</div>

Hi, I'm new to ELK and trying to learn what all I could from your documentation and various blogs.

I'm trying to create a simple graph in Kibana which depicts the height of students across years.

I'm trying to reproduce the same graph that I have created in excel with Kibana. Attaching the graph of XLS which I'm trying to replicate in Kibana and what I got from Kibana. Is there a way it can be done ?

 ![Student_Height](https://us1.discourse-cdn.com/elastic/original/3X/5/3/5303cdbb09815a67af5112bdad951a425c8414c0.jpg) ![Student_Height%20in%20Kibana](https://us1.discourse-cdn.com/elastic/original/3X/4/d/4dc6ade8ccdd1bc5c69f20afecbc3b07cd2bf91d.jpg)

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [March 8, 2018, 6:39pm UTC](https://discuss.elastic.co/t/simple-graph-creation-on-kibana-for-year-on-year-metrics/123060/2 "2018-03-08T18:39:23Z")

</div>

OK, we can replicate that chart in Kibana, here's what you need to do.  
First, the Y-axis where you want to display the height, we can use a "Max" of the "height field.  
Now, on the X-axis, we do a "Terms" aggregation on the "Name" field.  
Then we do a Split Series on the "year" field and set the Mode of the X-axis in the "Metrics and Axis" tab to Normal instead of Stacked.

I did something similar with some dummy Apache log data:

 ![apache](https://us1.discourse-cdn.com/elastic/original/3X/9/4/9446c186fb63a0939195293422b04fbcc25215c2.png)

But keep in mind, in this setup I assumed a data structure like this:  
{ name: Albert, year: 2015, height: 150}, { name: Albert, year: 2016, height: 160} and so on.

---

<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:** [April 5, 2018, 6:39pm UTC](https://discuss.elastic.co/t/simple-graph-creation-on-kibana-for-year-on-year-metrics/123060/3 "2018-04-05T18:39:31Z")

</div>

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