apexcharts.js icon indicating copy to clipboard operation
apexcharts.js copied to clipboard

Hide all series

Open PierreArn opened this issue 2 years ago • 3 comments

Summary

Please provide a brief summary of your proposal. Two to three sentences is best here. I'd like to hide a bunch of series by their seriesName, however, the following technique has a slow execution: ["Series1", "Series2", "Series3"].forEach((series) => chart.hideSeries(series));

Intended Use Case

I'd like to use a method called hideAllSeries(seriesArray), or an update of the current hideSeries, that takes an array of possible series currently rendered, and hide them programmatically.

PierreArn avatar Jun 20 '22 10:06 PierreArn

['Series 1', 'Series 2', 'Series 3',]
    .forEach(s => {
        chart.hideSeries(s);
    });

https://apexcharts.com/docs/methods/#hideSeries

ordago avatar Jun 20 '22 16:06 ordago

That is just what i said, this technique has a slow execution cause the chart update every time this method is called. So i need a method to not use a loop.

PierreArn avatar Jun 21 '22 09:06 PierreArn

Sorry, I don't know how I missed that. 😅

There were previous issues about this before:

#3062

#1787

So maybe your best chance is to PR it.

ordago avatar Jun 21 '22 09:06 ordago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 20 '22 14:08 github-actions[bot]