How to reset options on a chart dynamically, without destroying it #3635
Unanswered
PSteinhaus
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there.
I just opened an issue in error, describing my problem: apexcharts/react-apexcharts#487
As you can see I've realized my mistake:
newOptions
are actually merged in when usingupdateOptions
, as clearly stated in the docs.Now I wonder: Is there any way to reset the option state back to the default state where no fields are defined, or is this impossible due to changes being merged in, only ever increasing the number of defined fields but not being able to undefine/delete them.
I know I can do something like
newOptions.stroke = undefined
to get what I want forstroke
, but is there any elegant way to achieve this for all fields, i.e. a better way than writing outnewOptions.blablabla = undefined
for every single possible option described in the documentation?My problem is weirdly seemingly the opposite of this one...
Beta Was this translation helpful? Give feedback.
All reactions