PowerChart Pen Property Change Script

I was trying to make a Property Change Script for pens in a PowerChart. Here's my code:

Code
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
    pens = list(self.props.pens)
    changed = False

    for pen in pens:
        # Get name of pen
        name = pen.get("name", "").lower()

        # If it contains open or close then desired axis is "Valves" else "Default"
        desiredAxis = "Valves" if (
            "open" in name or
            "close" in name
        ) else "Default"

        # If the axis isn't the desired axis then change to desired axis
        if pen.get("axis") != desiredAxis:
            system.perspective.print("Changing axis because it's not desired: " + str(pen["axis"]))
            pen["axis"] = desiredAxis
            changed = True

    if changed:
        self.props.pens = pens

I have 2 setup axes. "Default" and "Valves". The script seems to do it's job perfectly. The problem seems to be that the PowerChart component is resetting the pen axis to an empty string. So it will switch between "" and one of the 2 desired setup axes. Is there some way to get PowerChart to stop changing the axis of a pen once I set it? I'm guessing it's a React State. If I could change it's state via code that would work too.