# Easy Chart Zoom Data Change

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834>\
**Category:** Archived Topics\
**Created:** [October 6, 2008, 3:48pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834 "2008-10-06T15:48:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmusser](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dmusser](https://forum.inductiveautomation.com/u/dmusser)\
**Post date:** [October 6, 2008, 3:48pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/1 "2008-10-06T15:48:10Z")

</div>

Is it possible to change data in a data set by using the zoom command (Rectangular Selection) on an easy chart?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [October 6, 2008, 6:54pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/2 "2008-10-06T18:54:31Z")

</div>

I don’t think I understand the question…

---

<div class="post-metadata">

**Author:** ![dmusser](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dmusser](https://forum.inductiveautomation.com/u/dmusser)\
**Post date:** [October 6, 2008, 7:25pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/3 "2008-10-06T19:25:15Z")

</div>

Explanation of question:

There is an easy chart (data from a data set).  
There is a table (same data from data set that the easy chart uses).

When the operator zooms in to see data on the easy chart, I would like to update the table so that the table lists the data based upon what the operator zoomed in on.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [October 6, 2008, 7:45pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/4 "2008-10-06T19:45:34Z")

</div>

Hmm, no, I don’t think there is an easy way to do this. You can do it if they zoom in using the date picker at the bottom of the easy chart, but not the zoom control.

You could do this with some fancy scripting that drilled into the chart to get a hold of the X-axis upper and lower bounds, and then use those dates to refresh the dates on your table’s query. It would have to be executed periodically (on a timer) because there is no event that you could monitor to see when the user zoomed. If you’d like to pursue this, I can write a sample script.

Let me know.

---

<div class="post-metadata">

**Author:** ![dmusser](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dmusser](https://forum.inductiveautomation.com/u/dmusser)\
**Post date:** [October 6, 2008, 8:02pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/5 "2008-10-06T20:02:15Z")

</div>

The customer liked the idea that if he could zoom in AND out, the dates might automatically change rather than keep changing the dates on the date range bar. (Also, revert back to the original specified dates when zooming out. Will the timer work so that it only looks when there is a drawn rectangle in the easy chart? Will there be any side effects? This would be nice to try if it does not take too much effort.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [October 6, 2008, 8:15pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/6 "2008-10-06T20:15:59Z")

</div>

Ok, here is a window that shows how to pull out the zoom start and end dates out of the X-Axis. Notice that the first label displays the selected date range, and the second label displays the zoomed date range. You could use this technique to power a table based on the zoom start and zoom end dates very easily.

Hope this helps,  
[chart\_zoom\_demo.fwin](https://us1.discourse-cdn.com/inductiveautomation/original/1X/a7f7e26ac2584b5a2e23b25a62169279a4297846.fwin) (53.2 KB)

---

<div class="post-metadata">

**Author:** ![dmusser](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dmusser](https://forum.inductiveautomation.com/u/dmusser)\
**Post date:** [October 7, 2008, 1:37pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/7 "2008-10-07T13:37:18Z")

</div>

Works well.  
However, What can I use to give me a trigger stating when the chart is in zoom mode or not, so that I can select which date range to use?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [October 7, 2008, 3:32pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/8 "2008-10-07T15:32:59Z")

</div>

You shouldn’t need to - the zoom range should always be accurate as to what the chart is looking at (especially if you turn off x-axis autorange)

---

<div class="post-metadata">

**Author:** ![dmusser](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dmusser](https://forum.inductiveautomation.com/u/dmusser)\
**Post date:** [October 7, 2008, 4:53pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/9 "2008-10-07T16:53:21Z")

</div>

Even on your sample screen, I am getting offsets on the beginning and at the end. X axis is NOT on auto range.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [October 7, 2008, 5:29pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/10 "2008-10-07T17:29:22Z")

</div>

Are you sure? Note that X-axis auto range is ON by default. On my sample screen, when I turn x-axis autorange off, my selected range and my zoomed range are exactly equivalent

---

<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:** [October 7, 2008, 6:24pm UTC](https://forum.inductiveautomation.com/t/easy-chart-zoom-data-change/834/11 "2008-10-07T18:24:56Z")

</div>

The Easy Chart component’s “X Axis Autorange” property is available in FactoryPMI 3.2.4 and above. The property allows the X-Axis to follow exactly the chosen date range, not just the range for which there is valid data.
