# Change schedule zoom through expression/script

**URL:** <https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 6, 2023, 12:55pm UTC](https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777 "2023-12-06T12:55:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitchell\_Maziarz](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Mitchell\_Maziarz](https://forum.inductiveautomation.com/u/Mitchell_Maziarz)\
**Post date:** [December 6, 2023, 12:55pm UTC](https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777/1 "2023-12-06T12:55:57Z")

</div>

In the equipment scheduler, the default zoom can be changed at will, but it appears that the actual zoom control on the chart has to be changed manually. Is there any way to change this through an expression or script? I have varying time frames that I would like to display data, and it would be nice to not make the user change this setting.

---

<div class="post-metadata">

**Author:** ![vasanth.p](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/vasanth.p/32/38099_2.png) [@vasanth.p](https://forum.inductiveautomation.com/u/vasanth.p)\
**Post date:** [February 14, 2024, 2:41pm UTC](https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777/2 "2024-02-14T14:41:18Z")

</div>

I am stuck with this issue too!

One solution is to reload the whole page using,

`system.perspective.refresh()`

Seems the component is not refreshing after changing the defaultZoom levels if set through script / expression.

Are there any workarounds, to refresh the component? or does doing any other action will refresh the component ?

@ayu

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [October 14, 2024, 6:35am UTC](https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777/3 "2024-10-14T06:35:19Z")

</div>

I need to do this too  
It seems the 'defaultZoom' parameter cannot be written or read dynamically  
It is a pain for the users to re-enter his required setting every time they navigate back to the page  
jrd

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 14, 2024, 7:04am UTC](https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777/4 "2024-10-14T07:04:36Z")

</div>

If it's a default settings, the component has no reason to use it after its initial load. That's what a default is. So you'd need to trigger a full reload of the component for it to take the new default into account.

What exactly do you need to do ?

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [October 15, 2024, 1:45am UTC](https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777/5 "2024-10-15T01:45:27Z")

</div>

Yes, it is a default setting! That is the problem!  
Users need to change the zoom level at run time. I guess that is why there is a zoom selector on the component  
So the user zooms to his desired zoom level.  
But when he navigates to another screen, then returns to the gantt, it has defaulted back to the default zoom. He then has to re-zoom  
My users complain about this.

I would like to read the zoom level on change, and store it to say a session variable. Then when the user returns to the gantt view I can restore zoom to his selected level

Hope this makes sense

---

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [October 21, 2024, 7:03am UTC](https://forum.inductiveautomation.com/t/change-schedule-zoom-through-expression-script/82777/6 "2024-10-21T07:03:32Z")

</div>

so i guess the answer is no, it cant be written or read

How do I go about getting this placed on a feature/fix for future releases?

Does anyone know a work around for this?  
Any idea when it will be implemented into Ignition?
