# Dynamically changing y-axis fields

**URL:** <https://discuss.elastic.co/t/dynamically-changing-y-axis-fields/171005>\
**Category:** Kibana\
**Tags:** elastic-stack-graph\
**Created:** [March 5, 2019, 11:52pm UTC](https://discuss.elastic.co/t/dynamically-changing-y-axis-fields/171005 "2019-03-05T23:52:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spanati](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@spanati](https://discuss.elastic.co/u/spanati)\
**Post date:** [March 5, 2019, 11:52pm UTC](https://discuss.elastic.co/t/dynamically-changing-y-axis-fields/171005/1 "2019-03-05T23:52:31Z")

</div>

Hi,

I have an index with a few fields out of which one is in json format. Lets say I have "statistics" field as json. I also have a time field say "executedTime" which is in epoch milliseconds and a name field which is a string. Lets take a couple records in the index as an example  
Ex: 1)  
"Name" : "test1"  
"statistics" : {  
"a" : 100,  
"b" : 200  
}  
"executedTime" : 1551467883000  
2)  
"Name" : "test2"  
"statistics" : {  
"b" : 100,  
"c" : 300  
}  
"executedTime" : 1551467998000

Now I want a graph visualization with executedTime on the x-axis and different statistics on the y axis. I have a control visualization which I use to filter the graph based on the name (from drop down options). So when "test1" is selected from the options, y-axis will have two lines corresponding to a and b. When "test2" is selected, y-axis will have two lines corresponding to b and c on the graph. Is this possible in Kibana? Can the graph change its axis field dynamically based on the selection?

Thanks,  
Sam.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [March 6, 2019, 12:14am UTC](https://discuss.elastic.co/t/dynamically-changing-y-axis-fields/171005/2 "2019-03-06T00:14:39Z")

</div>

> Can the graph change its axis field dynamically based on the selection?

No, the y-axis can not be dynamically allocated.

---

<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 3, 2019, 12:14am UTC](https://discuss.elastic.co/t/dynamically-changing-y-axis-fields/171005/3 "2019-04-03T00:14:44Z")

</div>

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