# Set y axis extents

**URL:** <https://discuss.elastic.co/t/set-y-axis-extents/85016>\
**Category:** Kibana\
**Created:** [May 9, 2017, 6:12am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016 "2017-05-09T06:12:12Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 9, 2017, 6:12am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/1 "2017-05-09T06:12:13Z")

</div>

I am using Kibana [5.Is](http://5.Is) there a way to set ymax and ymin for time of format HH:mm:ss

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 9, 2017, 10:03am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/2 "2017-05-09T10:03:08Z")

</div>

Hi @Padmavathy,

the `ymin` and `ymax` fields are number fields and as such do not accept dates as input. But if the date displayed on the y-axis is stored as a timestamp, you can use unix timestamp values in these fields.

A simple way to convert dates to timestamps is using the `date` utility on linux or macos systems, e.g.

```
$ date -d '2008-01-01 09:17:53' '+%s'
```

---

<div class="post-metadata">

**Author:** ![FardinBehboudi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fardinbehboudi/32/14906_2.png) [@FardinBehboudi](https://discuss.elastic.co/u/FardinBehboudi)\
**Post date:** [May 9, 2017, 10:15am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/3 "2017-05-09T10:15:26Z")

</div>

Normally time is in the X-axis. but generally, you can have automatic y-axis data range bounds or set static min and max bounds for y-axis in option --\> Set Y-Axis Extents and cale Y-Axis to Data Bounds.  
 ![](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d7fe0e584e62cbf9e6d272f956d1e194444a63ef.JPG)

---

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 11, 2017, 7:41am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/4 "2017-05-11T07:41:44Z")

</div>

Thanks @weltenwort but i have range of dates.When i set extent as epoch time i am not able to visualize the points.can you help with this issue

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 11, 2017, 8:27am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/5 "2017-05-11T08:27:49Z")

</div>

Could you tell me a bit more about the structure of your data? What do you use as the y- and x-axis aggregations, what types and value ranges do the fields have?

---

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 11, 2017, 4:31pm UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/6 "2017-05-11T16:31:59Z")

</div>

I am using date in x axis with datehistogram and time in y axis with 24 hour format ranging from 00 to 24 .what I need is to display time lets say from 4am to 6pm.I tried with epoch points are not getting plotted

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 12, 2017, 10:07am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/7 "2017-05-12T10:07:32Z")

</div>

So the field on the y-axis is of the integer (or short/byte) type? What aggregation are you using on the y-axis?

---

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 13, 2017, 12:19pm UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/8 "2017-05-13T12:19:07Z")

</div>

No its not of integer type.Its of type date and i have given min as aggregation.I am displaying time in format HH:mm:ss which i configured in the index pattern settings

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 15, 2017, 11:32am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/9 "2017-05-15T11:32:43Z")

</div>

In that case specifying the lower and upper bounds as timestamps in the `y-min`and `y-max` fields should work. Just make sure to specify them in milliseconds, since this is the timestamp precision Elasticsearch uses at the moment.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/1/5/15d2cb27d5653b97ca54f810d6e5cffca4a0e41c.png)

Formatted date strings can not be used in these fields, I'm afraid.

---

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 15, 2017, 4:41pm UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/10 "2017-05-15T16:41:36Z")

</div>

Thank you @weltenwort

when i set yaxis to data bounds i get the whole graph but i am not able to set a specific time frame

I have tried using milliseconds in set yaxis extents but i get a straight line.The time frame is adjusted say i set from 5 am to 8 pm it gets filtered out but i get a straight line instead of a line graph

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

i need a line graph with multiple points and within a specified time frame.Is this possible?

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 15, 2017, 5:00pm UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/11 "2017-05-15T17:00:50Z")

</div>

It looks like all values are below your `y-min` threshold. Have you accounted for the fact that the timestamp is usually in the UTC time zone?

---

<div class="post-metadata">

**Author:** ![Padmavathy](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@Padmavathy](https://discuss.elastic.co/u/Padmavathy)\
**Post date:** [May 21, 2017, 2:28am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/12 "2017-05-21T02:28:41Z")

</div>

Even if the value is above my y-min threshold i still get a straight line and i have set the timestamp to browser settings in Advanced Settings tab

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [May 31, 2017, 9:51am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/13 "2017-05-31T09:51:54Z")

</div>

When treating the timestamp values as numbers (which is what we do here) they are not timezone-adjusted.

---

<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:** [June 28, 2017, 9:52am UTC](https://discuss.elastic.co/t/set-y-axis-extents/85016/14 "2017-06-28T09:52:09Z")

</div>

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