Set Upper Bound on Easy Chart


I want to set the Upper Bound field of an Easy Chart to the EngHi metadata of the Custom property which is a UDT.

This code works from a button, but I want it to be done automatically once the binding has completed.

tp = event.source.parent.Analog.Meta.TagPath + "/In.EngHigh"
ex =

# Consolidate changes into a dictionary
updates = {"UPPER_BOUND": ex.value}
# Update the Easy Chart
chart = event.source.parent.getComponent("popTrend")
newPens = system.dataset.updateRow(chart.axes, 0, updates)
chart.axes = newPens