-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: <path> attribute d: Expected number, "M NaN NaN A NaN Na…" #2270
Comments
I have a very similar error but without switching chart types. I just switch between vue router pages and get this error:
|
Similar but with angular |
I am encountering this same error with p5js and p5.js-svg@1.0.7 trying to create a golden ratio spiral |
I have this error on resizing the window/viewport in certain situations. Mostly when switching to a new dynamically loaded graph. seems like the previous chart in apex not destroyed resulting in non existing graph, Apex should check on resize if a chart object still exists and if not remove the chart from the cached collection. I made a demonstration in the following jsbin |
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. |
I'm also facing the same issue in angular. |
same issue, how has everyone solved this? |
Created a new test page on jsbin. The ApexCharts engine is missing checks for removed charts or charts that does not exists anymore on the page. I also added the 'correct' method of removing charts on the page. But this is an ideal world situation which is not always possible. |
Also experiencing the same. Unfortunately, no substantial help can be found anywhere. |
Does anyone resolve this issue? |
I tried to clean up the left over chart on window.onbeforeunload but its not always working. Especially if you have multiple charts on the page or load charts dynamically inside the page and replace them on the fly or empty the chart(s) container. With multiple charts on the page i cache the container id's in a global var and go over them in obeforeunload and look if there is a chart attached to it and remove it. Again this is not always working. See "destroy chart via method" in my previous example The real fix would be that in the Apex code actually checks if the chart is still (visible) in the dom before going over resizing/updating etc. on a no longer existing chart. |
@pvh-archifact thank you so much! It worked here with Vue3. I created an array like
and then inside the hook function onUnmounted, call destroy() using the collection.
and it's working like a charm. |
I had a similar issue with React. I was defining the height and width of the chart as |
@klucass your example perfectly working on initial render. when i try to update the series I am facing the similar error. I tried |
I'm also facing this problem in react. |
In my case, this issue occurred when any of the values passed to the series were |
We've the same errors in console as above. How can this issue be marked as 'closed' while it's actually still happening? We're using apexcharts together with Vue3, and it seems like on resizing, other charts from previous route are still trying to resize? Any ideas? |
I pulled the repo and rebuild the dist with the 5c3bba0 fix. And deployed it into my application and it seems to fix the nan and node errors of removed graph elements and does not throw these errors anymore on resizing the window. |
![]() ![]() when i use legend: { show: false, }, when i use https://www.npmjs.com/package/react-apexcharts. |
I have this vue component where apexchart is being loaded. Inside the component the charts are switchable. Every time i switch from bar chart to pie or pie to bar chart I get this issue:
but switching from bar chart to line chart doesn't throw any errors. I think its a bug in the system.
This is how I've been switching the chart types:
The text was updated successfully, but these errors were encountered: