'How do you get a copy of the current series array instance in react-apexcharts / apexcharts?

I'm trying to get access to the current series array in react-apexcharts including data series items which have been toggled on/off, so I can loop through and set new a data series (seriesPercentage) based on the existing series instance, and update like this:

ApexCharts.exec("historic", "updateSeries", seriesPercentage);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source