# Canvas - Line Chart Element with Date for X Axis - Sometimes displays timestamp, sometimes doesn't

**URL:** <https://discuss.elastic.co/t/canvas-line-chart-element-with-date-for-x-axis-sometimes-displays-timestamp-sometimes-doesnt/255249>\
**Category:** Kibana\
**Tags:** canvas\
**Created:** [November 12, 2020, 5:29pm UTC](https://discuss.elastic.co/t/canvas-line-chart-element-with-date-for-x-axis-sometimes-displays-timestamp-sometimes-doesnt/255249 "2020-11-12T17:29:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![devbot](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@devbot](https://discuss.elastic.co/u/devbot)\
**Post date:** [November 12, 2020, 5:29pm UTC](https://discuss.elastic.co/t/canvas-line-chart-element-with-date-for-x-axis-sometimes-displays-timestamp-sometimes-doesnt/255249/1 "2020-11-12T17:29:02Z")

</div>

I have a line chart element in Kibana canvas with a timestamp being used as the X axis.

Depending on the results of the query behind this element, sometimes the X axis will show date and time (ex: "Nov 11 00:00") and sometimes it will show just the date (ex: "Nov 11").

Is there anything that can be added to the "Expression Syntax" of this element to force the display to be consistently one way or the other?

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [November 26, 2020, 4:05pm UTC](https://discuss.elastic.co/t/canvas-line-chart-element-with-date-for-x-axis-sometimes-displays-timestamp-sometimes-doesnt/255249/2 "2020-11-26T16:05:37Z")

</div>

This should depend on the time range of the query (caused by a query filter or a time range filter applied to canvas) depending on that time interval, we apply a different time formatter to show the most important part of the date on the x axis.  
The current implementation of the Line chart in Canvas doesn't respect the global formatter configured in the Kibana Advanced Settings unfortunately.  
A possible workaround is to create a visualization using Lens or Visualize and change the Kibana Advanced Settings -\> Scaled date format to your set of defined formatters for each specific data range

---

<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:** [December 24, 2020, 4:05pm UTC](https://discuss.elastic.co/t/canvas-line-chart-element-with-date-for-x-axis-sometimes-displays-timestamp-sometimes-doesnt/255249/3 "2020-12-24T16:05:40Z")

</div>

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