# Date Labels in Graphs

**URL:** <https://discuss.elastic.co/t/date-labels-in-graphs/260206>\
**Category:** Kibana\
**Created:** [January 5, 2021, 1:22pm UTC](https://discuss.elastic.co/t/date-labels-in-graphs/260206 "2021-01-05T13:22:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikramnr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikramnr/32/66065_2.png) [@vikramnr](https://discuss.elastic.co/u/vikramnr)\
**Post date:** [January 5, 2021, 1:22pm UTC](https://discuss.elastic.co/t/date-labels-in-graphs/260206/1 "2021-01-05T13:22:06Z")

</div>

I'm using line graph and use histogram over month to display a monthly view.

The date labels showing in the graph are not showing Monthly Dates ie. 01/12/2020, 01/11/2020 so on and so forth when selecting absolute time value in the filter. 01/09/2020 00:00:00.00 to 01/12/2020 00:00:00.000 instead having some random labels.

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

Is there any way we can change this behaviour? I have also noticied that it doesn't occur when we have relative time selected in the filter

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

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [January 5, 2021, 3:48pm UTC](https://discuss.elastic.co/t/date-labels-in-graphs/260206/2 "2021-01-05T15:48:25Z")

</div>

The format is controlled by the Scaled Date format advanced setting, `dateFormat:scaled`, which determines how to display the dates based on the interval between dates. By default, any interval greater than 1 day will show the full day, and there is no interval that shows the month label. You can change this by adding something like `["P28DT", "YYYY-MM"],` or `["P28DT", "MMMM"],`

---

<div class="post-metadata">

**Author:** ![vikramnr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikramnr/32/66065_2.png) [@vikramnr](https://discuss.elastic.co/u/vikramnr)\
**Post date:** [January 6, 2021, 1:21pm UTC](https://discuss.elastic.co/t/date-labels-in-graphs/260206/3 "2021-01-06T13:21:37Z")

</div>

Thanks @wylie . So doing so will affect all other dates displayed in other graphs where we use data histogram for days,weeks etc.,?

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [January 6, 2021, 2:34pm UTC](https://discuss.elastic.co/t/date-labels-in-graphs/260206/4 "2021-01-06T14:34:36Z")

</div>

That's right. We are tracking a feature request to add [custom date formatters to the Lens editor](https://github.com/elastic/kibana/issues/67206) as well as the more general request to add [custom formatters to Visualize](https://github.com/elastic/kibana/issues/4957)

---

<div class="post-metadata">

**Author:** ![vikramnr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikramnr/32/66065_2.png) [@vikramnr](https://discuss.elastic.co/u/vikramnr)\
**Post date:** [January 6, 2021, 3:48pm UTC](https://discuss.elastic.co/t/date-labels-in-graphs/260206/5 "2021-01-06T15:48:10Z")

</div>

It would be a great feature if implemented. Thanks for the help @wylie .

---

<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:** [February 3, 2021, 3:48pm UTC](https://discuss.elastic.co/t/date-labels-in-graphs/260206/6 "2021-02-03T15:48:17Z")

</div>

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