# XYChart Date X-Axis Range

**URL:** <https://forum.inductiveautomation.com/t/xychart-date-x-axis-range/29973>\
**Category:** Ignition Early Access\
**Created:** [November 14, 2019, 9:39pm UTC](https://forum.inductiveautomation.com/t/xychart-date-x-axis-range/29973 "2019-11-14T21:39:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [November 14, 2019, 9:39pm UTC](https://forum.inductiveautomation.com/t/xychart-date-x-axis-range/29973/1 "2019-11-14T21:39:50Z")

</div>

I’m using strict x-axis date ranges on an XYChart bound to two DateTime Pickers, and after upgrading to 8.0.6 the chart stopped working correctly. In order to get the chart working again, I had to add a transform to get the dates into milliseconds. It would be nice if these properties would accept the java.util.date objects that the DateTime Picker produces.

XYChart.xAxes.0.date.range.max  
XYChart.xAxes.0.date.range.min

---

<div class="post-metadata">

**Author:** ![AndrewWilliams](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@AndrewWilliams](https://forum.inductiveautomation.com/u/AndrewWilliams)\
**Post date:** [January 20, 2021, 10:17pm UTC](https://forum.inductiveautomation.com/t/xychart-date-x-axis-range/29973/2 "2021-01-20T22:17:27Z")

</div>

I spent about an hour trying to figure out why the max and min ranges weren’t working on the XY Chart, and this answered my question! I am on 8.1 and the same issue persists.

Another thing is that by using the timestamp, it has to be an int for it to work, but Ignition throws an error saying it expects a string in date.range.max and min.

---

<div class="post-metadata">

**Author:** ![aspatchek2013](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aspatchek2013/32/85339_2.png) [@aspatchek2013](https://forum.inductiveautomation.com/u/aspatchek2013)\
**Post date:** [October 6, 2022, 1:17pm UTC](https://forum.inductiveautomation.com/t/xychart-date-x-axis-range/29973/3 "2022-10-06T13:17:20Z")

</div>

I'm on 8.1.20 and found the same results. Thanks for posting!

---

<div class="post-metadata">

**Author:** ![rod.rebman](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rod.rebman](https://forum.inductiveautomation.com/u/rod.rebman)\
**Post date:** [November 29, 2022, 9:56pm UTC](https://forum.inductiveautomation.com/t/xychart-date-x-axis-range/29973/4 "2022-11-29T21:56:08Z")

</div>

Thank you, this ended up working well. For future reference, the transform is toMillis(date) and it still returns an error:

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ff0562e66a8ab3cf0445034461d54b10eb8507cb.png)
