react-apexcharts
react-apexcharts copied to clipboard
Using state values in react in a label formatter fails to update labels
Bug report
The issue can be reproduced in the codesandbox below. Click the toggle
button to switch between a state value. The labels update the first time, but then stops to update.
https://codesandbox.io/s/react-basic-example-k0gjm
Explanation
-
What is the behavior you expect? I expect the labels to update when I change the state value.
-
What is happening instead? It works the first re-render, and then stops working
-
What error message are you getting? None.
Just happened upon the same issue, apparently setting a different id for the chart every render fixes it.
https://codesandbox.io/s/react-basic-example-mmmi9 Working now. (From your sandbox :) ).
Thank you so much buddy : ) 👍