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

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?

3 Likes

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.

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.

1 Like

How do you add this pen ?

“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), 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.

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.

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)

2 Likes

yes, that worked, thank you.

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.