# Perspective Time Series Chart y-axis scale change doesn't redraw

**URL:** <https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663>\
**Category:** Ignition\
**Created:** [February 21, 2021, 11:28pm UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663 "2021-02-21T23:28:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/philip/32/5709_2.png) [@philip](https://forum.inductiveautomation.com/u/philip)\
**Post date:** [February 21, 2021, 11:28pm UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/1 "2021-02-21T23:28:20Z")

</div>

If I set a binding on the min and max of an axis on a time series chart or change the min max value via a script, the chart does not update the axis until the mouse is over it. Is there a way to have the chart automatically redraw when the min / max changes or is there a python method to do this?

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [April 15, 2021, 3:19pm UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/2 "2021-04-15T15:19:57Z")

</div>

> [@philip](#):
>
> n and max of an axis on a time series chart or change the min max value via a script, the chart does not update the axis until the mouse is

I've been seeing this too and it's driving me insane. It's supposedly supposed to auto-scale depending on the input data if no min / max is set but even setting them manually doesn't force it to redraw.

---

<div class="post-metadata">

**Author:** ![catherine.fowler](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@catherine.fowler](https://forum.inductiveautomation.com/u/catherine.fowler)\
**Post date:** [April 26, 2021, 8:22pm UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/3 "2021-04-26T20:22:48Z")

</div>

I also found the same problem trying to accomplish the same thing. The best solution I’ve found is adding a pen and removing it whenever you adjust the min/max - the chart redraws if pens have changed. It’s a little janky, but it works. If anybody finds a cleaner solution, I’d love to hear it.

---

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [February 8, 2022, 1:05pm UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/4 "2022-02-08T13:05:49Z")

</div>

How do you add this pen ?

---

<div class="post-metadata">

**Author:** ![catherine.fowler](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@catherine.fowler](https://forum.inductiveautomation.com/u/catherine.fowler)\
**Post date:** [February 8, 2022, 1:32pm UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/5 "2022-02-08T13:32:18Z")

</div>

“Pen” as in just one of the `trends` in the `plots` element of the time series chart. My setup for the time series chart was based off the ad hoc trends from the Perspective demo ([Perspective](https://demo.inductiveautomation.com/data/perspective/client/OnlineDemo/feature/history/adhoc)), so there was just a custom property that was a list of the pens to involve that I modified to force a refresh. What that boiled down to was modifying the `plots` array on the chart. I haven’t tested exactly what needs to be modified in the `plots` array to trigger a refresh, but if you add some script that modifies then resets the `plots` array after your script to change the min/max, it should force a refresh.

---

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [February 9, 2022, 11:02am UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/6 "2022-02-09T11:02:17Z")

</div>

I’ve tried several things, but none work.  
I can force a refresh if I add or change some value, but if I then remove that change right after, then the chart doesn’t redraw.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 9, 2022, 11:33am UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/7 "2022-02-09T11:33:48Z")

</div>

Changing a property to fast can cause it miss one or the other change. as these changes need to travel to the gateway and back to the client.  
It might be better to just increment something by 1 (and revert it to 0 when it goes to high)

---

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [February 9, 2022, 1:31pm UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/8 "2022-02-09T13:31:41Z")

</div>

yes, that worked, thank you.

---

<div class="post-metadata">

**Author:** ![ccorrea](https://avatars.discourse-cdn.com/v4/letter/c/919ad9/32.png) [@ccorrea](https://forum.inductiveautomation.com/u/ccorrea)\
**Post date:** [December 1, 2022, 1:05am UTC](https://forum.inductiveautomation.com/t/perspective-time-series-chart-y-axis-scale-change-doesnt-redraw/43663/9 "2022-12-01T01:05:52Z")

</div>

Any update on this issue being solved? Experiencing it right now, and not sure if -more than a year later- it still has not been solved natively by IA. Thanks.
