apexcharts/ng-apexcharts

Add / remove annotations triggers a complete update of the chart. Toggle state gets lost

Closed this issue · 1 comments

What do I want to achieve

I want to add, remove or update series and annotations dynamically without losing the toggle state of the chart.
It would be great if someone could give me a solution to this problem 🙏🏼.

Problem

If series are hidden and I add or remove annotations, the whole diagram is re-rendered and all series are shown again. The same happens with updateSeries(). Although it makes sense with updateSeries because I put all the series in. But it would be better to be able to keep the toggle state. Is it possible to hide the initial series or keep the toggle state?

Example (Stackblitz)

https://stackblitz.com/edit/angular-ivy-zyp4km?file=src/app/app.component.ts

Example (Codepen apexcharts.js)

Adding/removing annotations dynamically works in apexchart.js
https://codepen.io/h31k0/pen/LYBdROL?editors=1011

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.