# Timestamp on y-axis vs custom field on x-axis

**URL:** <https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507>\
**Category:** Kibana\
**Created:** [June 12, 2019, 8:03pm UTC](https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507 "2019-06-12T20:03:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dundundundun](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dundundundun](https://discuss.elastic.co/u/dundundundun)\
**Post date:** [June 12, 2019, 8:03pm UTC](https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507/1 "2019-06-12T20:03:11Z")

</div>

I am trying to plot a custom field on the x-axis with the timestamp on the y-axis. I see that I can choose among different fields on the x-axis but the y-axis is fixed to different data metrics like count. How can I customize the y-axis to timestamp?

---

<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:** [June 12, 2019, 8:19pm UTC](https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507/2 "2019-06-12T20:19:59Z")

</div>

Create a horizontal bar chart to put time histogram on the y-axis

 ![56%20PM](https://us1.discourse-cdn.com/elastic/original/3X/e/2/e2208c9db652f9e7eddc9ecd8ee22b7c66abb0ff.jpeg)

---

<div class="post-metadata">

**Author:** ![dundundundun](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dundundundun](https://discuss.elastic.co/u/dundundundun)\
**Post date:** [June 12, 2019, 8:34pm UTC](https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507/3 "2019-06-12T20:34:31Z")

</div>

Sorry, when I use horizontal bar I get count on the x-axis and my custom temperature field on the y-axis. I still cannot get timestamp to be on the y-axis. I'm hoping to create a line graph with timestamp on the y-axis and temperature field on the x-axis.

---

<div class="post-metadata">

**Author:** ![dundundundun](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dundundundun](https://discuss.elastic.co/u/dundundundun)\
**Post date:** [June 14, 2019, 1:56pm UTC](https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507/4 "2019-06-14T13:56:41Z")

</div>

Sorry, I've found that I should be using the timelion data visualization. I am wondering if it's possible to plot time vs a particular field instead of an index. If not, how can I create a particular index based on a particular field, eg: temperature?

---

<div class="post-metadata">

**Author:** ![dundundundun](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dundundundun](https://discuss.elastic.co/u/dundundundun)\
**Post date:** [June 17, 2019, 6:29pm UTC](https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507/5 "2019-06-17T18:29:08Z")

</div>

Resolved: we had to convert our custom temperature field (which by default is of datatype string) into a number by adding :int in our grok filter as follows: %{TEMPERATURE: temperature:int}.  
Then, we went to the "line" option under visualization and selected "Top Hit" as our aggregation on the y-axis, selected our temperature field, aggregated with min, and then sorted by @timestamp.  
On the x-axis, we selected terms and then @timestamp as the field.

Would be helpful to update this on some sort of documentation if possible for others in the future as plotting 2 fields on a graph should be rather intuitive, thanks!

---

<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:** [July 15, 2019, 6:29pm UTC](https://discuss.elastic.co/t/timestamp-on-y-axis-vs-custom-field-on-x-axis/185507/6 "2019-07-15T18:29:14Z")

</div>

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