# Perspective: XY Chart Date Range Not Working

**URL:** <https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [April 16, 2020, 4:35am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972 "2020-04-16T04:35:24Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben.Mehmet](https://avatars.discourse-cdn.com/v4/letter/b/58956e/32.png) [@Ben.Mehmet](https://forum.inductiveautomation.com/u/Ben.Mehmet)\
**Post date:** [April 16, 2020, 4:35am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/1 "2020-04-16T04:35:24Z")

</div>

Hi,

I’n currently having trouble getting the range on my XY chart to work, i have some historical data coming in with unknown start and end dates. i want to use the XY chart range to display specific date ranges - however the range doesnt seem to do anything. My x-axis setup is:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/6ad0fdc8f585ce75c09f882a0db5f397f1bbe71b.png)

my timestamp format is shown below:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/143e67f8375898f1d60d9e436f2274032fe867f8.png)

not sure if my time format is correct, ive tried multiple different formats but no luck:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b2cfd2e925b2d7fa098043ac4f4385532cb371c7.png)

attached is the XY chart json file. [xyChart.json](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/327b313b7d464defaae12033ac4ad17ef7a7cf93.json) (4.6 KB)

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [August 5, 2020, 3:53am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/2 "2020-08-05T03:53:22Z")

</div>

Were you able to find a solution to this? I am running into a similar problem. I’m trying to use a date range picker to “zoom” in on data by binding the start/end of the picker to the min/max on the x-axis range property. But no matter what I do, changing the range min/max has no impact on the XYChart.

---

<div class="post-metadata">

**Author:** ![Ben.Mehmet](https://avatars.discourse-cdn.com/v4/letter/b/58956e/32.png) [@Ben.Mehmet](https://forum.inductiveautomation.com/u/Ben.Mehmet)\
**Post date:** [August 5, 2020, 4:46am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/3 "2020-08-05T04:46:36Z")

</div>

Unfortunately not, i had to filter the incoming data which was not ideal. Hopefully someone can help on this issue ??

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [November 24, 2020, 9:51pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/4 "2020-11-24T21:51:35Z")

</div>

Same issue here, any fix on your side?

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [December 8, 2020, 7:21pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/5 "2020-12-08T19:21:46Z")

</div>

Actually found a fix. The chart gives an error in the property editor, but the display works. You simply need to use milliseconds “toMillis(yourDate)” directly. The property editor expect a string and not a number, but for some reason, only the number works.

---

<div class="post-metadata">

**Author:** ![dyates](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dyates/32/20197_2.png) [@dyates](https://forum.inductiveautomation.com/u/dyates)\
**Post date:** [December 17, 2020, 12:36am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/6 "2020-12-17T00:36:45Z")

</div>

Where do you put the ToMillis? I’m having this same issue. SQL query for a dataset on example. Timestamp is not good for the x axis.

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [December 17, 2020, 12:57am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/7 "2020-12-17T00:57:07Z")

</div>

In my case, the value must be an integer to work.

My value was a date, so I added a Transform in my binding to convert the date to an integer.

---

<div class="post-metadata">

**Author:** ![dyates](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dyates/32/20197_2.png) [@dyates](https://forum.inductiveautomation.com/u/dyates)\
**Post date:** [December 17, 2020, 1:12am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/8 "2020-12-17T01:12:03Z")

</div>

Thanks so much, were you using a SQL Query for your dataset as well?

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [December 17, 2020, 1:25am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/9 "2020-12-17T01:25:42Z")

</div>

Yes and no, Historical data in a custom property, then a script that merge it with the result from a named query.

---

<div class="post-metadata">

**Author:** ![dyates](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dyates/32/20197_2.png) [@dyates](https://forum.inductiveautomation.com/u/dyates)\
**Post date:** [December 17, 2020, 1:40am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/10 "2020-12-17T01:40:43Z")

</div>

Great, thanks so much. I’ll give it a whirl. We attempted to modify the SQL Database output, but it still would not work with our chart. Outputting an INT in an attempt to provide ms. Not sure if our config was right for our XY Chart

---

<div class="post-metadata">

**Author:** ![Marcus\_Stubbles](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Marcus\_Stubbles](https://forum.inductiveautomation.com/u/Marcus_Stubbles)\
**Post date:** [February 6, 2023, 4:07pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/11 "2023-02-06T16:07:09Z")

</div>

Just wanted to say that as of today and using v8.1.20, this is _still_ an issue and it is getting really annoying. The chart won't obey your min and max values unless they are presented as integers (specifically, as a time in millisesconds), but the designer insists you have an error because the value is not a string. So you've either got to get used to seeing the "error" in the designer, or else give up having a min/max range in your chart.

---

<div class="post-metadata">

**Author:** ![Mayur\_Sakshi](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Mayur\_Sakshi](https://forum.inductiveautomation.com/u/Mayur_Sakshi)\
**Post date:** [July 8, 2024, 10:29am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/12 "2024-07-08T10:29:53Z")

</div>

When rendering the date time column from a query, parse it as string in your script, str(yourdatetimeobject). This will solve your problem.

---

<div class="post-metadata">

**Author:** ![uTewell](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@uTewell](https://forum.inductiveautomation.com/u/uTewell)\
**Post date:** [September 23, 2025, 12:36pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-date-range-not-working/33972/13 "2025-09-23T12:36:44Z")

</div>

This bug appears to still be present. Changing the value to milliseconds makes the range function work, but the view throws a warning in my logs any time it loads now.

Is there a way to mask this one specific instance of this warning from the logs?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/1/81a3ec9b0df7d8fd95524ca87eda4179f9f9edae.png)
