-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 when data are null or 0 for donut graph #705
Comments
Have you solved this? |
Same here, has this been solved yet |
Some by resolved this issue? Also, I want to show 'NaN' it gets the error in the console too. |
If you do not have data, just provide an empty array as data, you would not have any error message ;-) |
@pierresh it works, thank you! 👍 |
You are welcome! By the way, I found a solution to prevent the error message in console, we just need to check if the path to be drawn by Raphael contains a 'NaN'. Below is a solution in Coffee script file:
And below is the solution in Javascript (about line 2059 in morris.js)
|
Original idea from morrisjs#705
Idea got in this discussion morrisjs#705
If you don't have the data in the first rendering, just provide an empty array with a null object. (code below)
|
I simply have a "0", not a NaN. Same error showing up for an .Area({}) Even when I put in 1.23456 instead of 0, or 0.0000001 it has this error |
Hi,
when all data are empty or 0 % it cause 4 errors in console js for each value we set 👍
Error: attribute d: Expected number, "M,0,0".
q @ raphael-min.js:10
raphael-min.js:10 Error: attribute d: Expected moveto path command ('M' or 'm'), "Z".
q @ raphael-min.js:10
raphael-min.js:10 Error: attribute d: Expected number, "M,0,0".
q @ raphael-min.js:10
raphael-min.js:10 Error: attribute d: Expected moveto path command ('M' or 'm'), "Z".
q @ raphael-min.js:10
raphael-min.js:10 Error: attribute d: Expected number, "M,0,0".
q @ raphael-min.js:10
raphael-min.js:10 Error: attribute d: Expected moveto path command ('M' or 'm'), "Z".
is there any way to prevent this ? an option or handle when there is no data ? imagine for 3 i have data and for one no yet data it will cause an exception in logs....
thanks !
an great lib !
The text was updated successfully, but these errors were encountered: