Zooming out of a chart resets the configuration

I’ve been having an issue with my chart configuration being reset every time the user zooms into then out of the chart. My charts are configured with configureChart.

I’m wondering if there is any way around this

Before Zoom:

I would post both pictures but “new users can only post one picture”

After Zoom:

As you can see my line renderer and my legend configuration got reset to defaults.

I managed to hack together a solution, by having the function called on mouse events. Not ideal, but it works.