# Zoom In/Out of Easy Chart Scripting

**URL:** <https://forum.inductiveautomation.com/t/zoom-in-out-of-easy-chart-scripting/17888>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [May 1, 2018, 5:22pm UTC](https://forum.inductiveautomation.com/t/zoom-in-out-of-easy-chart-scripting/17888 "2018-05-01T17:22:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbhagotra](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@mbhagotra](https://forum.inductiveautomation.com/u/mbhagotra)\
**Post date:** [May 1, 2018, 5:22pm UTC](https://forum.inductiveautomation.com/t/zoom-in-out-of-easy-chart-scripting/17888/1 "2018-05-01T17:22:08Z")

</div>

Hello,

I’m trying to create buttons so that I can Zoom In and Out of the Domain Range of an Easy Chart. Ultimately I will be hiding the right click popup that has this function. I figured since these options are available in the right click menu and the JFreeChart object has Zoomable methods that scripting a button to accomplish this would be possible. However I can’t seem to get it done correctly so if anyone has any insight on how to access these functions via scripting that would be appreciated. Thanks.

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ec4c557f77178d98b32537092aa5d7405eee2c25.png)

---

<div class="post-metadata">

**Author:** ![salbrechtsen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/salbrechtsen/32/18660_2.png) [@salbrechtsen](https://forum.inductiveautomation.com/u/salbrechtsen)\
**Post date:** [May 2, 2018, 9:55pm UTC](https://forum.inductiveautomation.com/t/zoom-in-out-of-easy-chart-scripting/17888/2 "2018-05-02T21:55:58Z")

</div>

It looks like this is time series data. You could use scripting to change the start and end date for the chart. That should effectively “zoom” in and out.

---

<div class="post-metadata">

**Author:** ![mbhagotra](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@mbhagotra](https://forum.inductiveautomation.com/u/mbhagotra)\
**Post date:** [May 2, 2018, 10:25pm UTC](https://forum.inductiveautomation.com/t/zoom-in-out-of-easy-chart-scripting/17888/3 "2018-05-02T22:25:44Z")

</div>

That makes sense, that’s probably what that function is doing any ways. Thought it was worth asking if a direct function call was available. Thanks!

---

<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:** [May 2, 2018, 10:44pm UTC](https://forum.inductiveautomation.com/t/zoom-in-out-of-easy-chart-scripting/17888/4 "2018-05-02T22:44:23Z")

</div>

It’s not what it’s doing. Unfortunately, its ridiculously complicated, and I’d have to spend a few hours with an old project to figure out how to explain it. IIRC, the key was to hijack the chart’s default right-click popup menu and copy its actions to a new popup.
