# Get Date Range from Easy Chart after zoom

**URL:** <https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 22, 2013, 7:03pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915 "2013-02-22T19:03:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nate.Olson](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nate.Olson](https://forum.inductiveautomation.com/u/Nate.Olson)\
**Post date:** [February 22, 2013, 7:03pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/1 "2013-02-22T19:03:50Z")

</div>

I found this post from 2008 (see link below). Support provided a Window that demonstrates pulling the current zoomed range out of any easy chart. I think it was done in FactoryPMI so I can't import the window into Ignition to test. Is there a different way to do this in Ignition or could I get a sample window to view the scripting?

Thanks

[viewtopic.php?f=23&t=3722&p=6656](http://www.inductiveautomation.com/forum/viewtopic.php?f=23&t=3722&p=6656)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 22, 2013, 7:43pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/2 "2013-02-22T19:43:10Z")

</div>

Ok, I have made an Ignition backup of that window. It is a project backup so you can go into the designer and import it.

[ChartZoomDemo\_2013-02-22\_1141.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/eaf1d42217e235f8321f4f9ab0afde08b9a0bac2.proj) (21.7 KB)

---

<div class="post-metadata">

**Author:** ![Kraenbring](https://avatars.discourse-cdn.com/v4/letter/k/f4b2a3/32.png) [@Kraenbring](https://forum.inductiveautomation.com/u/Kraenbring)\
**Post date:** [June 11, 2016, 1:18pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/3 "2016-06-11T13:18:18Z")

</div>

For anyone looking for this, here’s the important ‘innards’ of that project export:

chart = event.source.parent.getComponent(“Easy Chart”)  
jfChart= chart.getComponent(0).getComponent(0).getChart()  
xAxis = jfChart.getPlot().getDomainAxis()

startDate = xAxis.getMinimumDate()  
endDate = xAxis.getMaximumDate()

I found this and needed it to get the range on an easy chart while in either realtime or historical mode.  
While in realtime, the End Date is set to

Very, helpful. Thanks!

---

<div class="post-metadata">

**Author:** ![tim.svoboda](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@tim.svoboda](https://forum.inductiveautomation.com/u/tim.svoboda)\
**Post date:** [June 26, 2023, 11:17pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/4 "2023-06-26T23:17:17Z")

</div>

Very helpful indeed. Only one small correction to Kraebring's post, the chart name should be single quotes ('Easy Chart'), not double quotes.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 27, 2023, 12:12am UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/5 "2023-06-27T00:12:18Z")

</div>

> [@tim.svoboda](#):
>
> not double quotes.

Actually, either. But if you copied and pasted from the above, you didn't get actual double quotes, but reformatted "curly" quotes. A side effect of the change in forum software in the intervening years.

Still happens if you don't mark pasted code as "preformatted text" with the proper comment editor button.

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [June 27, 2023, 2:24pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/6 "2023-06-27T14:24:02Z")

</div>

Thread from the dead (7 years), but might lead me down the correct path.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [June 27, 2023, 7:56pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/7 "2023-06-27T19:56:50Z")

</div>

> [@robertm](#):
>
> from the dead (7 years)

> [@tim.svoboda](#):
>
> Only one small correction

While I'm sure this was probably accurate information 7 years ago, this is no longer the best approach for getting the zoomed date range. We now have zoomedStartDate and zoomedEndDate fields directly on the chart component, so the solution is simply:

```auto
chartComponent = event.source.parent.getComponent('Easy Chart')
zoomedStartDate = chartComponent.zoomedStartDate
zoomedEndDate = chartComponent.zoomedEndDate

```

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [June 27, 2023, 11:39pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/8 "2023-06-27T23:39:34Z")

</div>

Yes, thanks, I saw similar in another thread. Could you point me to where all the various properties are listed for a component, the Easy Chart in this case? I know I can hover over them in the property windows, but is there an actual document that we can see everything at a glance?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [June 27, 2023, 11:46pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/9 "2023-06-27T23:46:41Z")

</div>

> [@robertm](#):
>
> is there an actual document that we can see everything at a glance?

[https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.20/com/inductiveautomation/factorypmi/application/components/PMIEasyChart.html](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.20/com/inductiveautomation/factorypmi/application/components/PMIEasyChart.html)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 27, 2023, 11:47pm UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/10 "2023-06-27T23:47:27Z")

</div>

> [@robertm](#):
>
> but is there an actual document that

The [user manual](https://docs.inductiveautomation.com/display/DOC81/Components), perhaps? And not just for this one Vision component.

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [June 28, 2023, 12:09am UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/12 "2023-06-28T00:09:12Z")

</div>

[https://docs.inductiveautomation.com/display/DOC81/Vision+-+Easy+Chart](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Easy+Chart)

I checked here before, but things like ZoomedStartDate are not listed

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [June 28, 2023, 12:47am UTC](https://forum.inductiveautomation.com/t/get-date-range-from-easy-chart-after-zoom/5915/13 "2023-06-28T00:47:03Z")

</div>

Thanks!
