-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
fixing class diagram #794
Comments
Would you care to write a PR for this, to mitigate the NaN issues? Or do you consider this expected behavior? |
PR done, changed some stuffs in the class renderer. there were problem with the g.nodes() and some extra classes got created which put some nodes "y" coordinates to NaN and hence the path.points picked up the NaNs so I had to remove them away and add more checkups on the g.nodes() also the number of classes was exceding the classes we have in the graph so I used a variable total to get exact classes number and I use that as modulo in the graph creation... its easier if you can view the diff in the renderer file I PRed. |
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. |
Thanks again @DanShai. I am closing this one as the PR is in place and released in 8.1.0. |
Hi ,
1- after debugging the class diagram there are many issues in the code mainly in the path.ponits assigned to and other variables like
lineData = path.points;
return NaN in the x and y of the points to the svg path hence the messed up diagrams.2- if your using react like me and getting this kind of errors Expecting 'CLASS_DIAGRAM', got 'NEWLINE' you should write the graph like this :
for example :
no space nor new line at the start or the end
hope this helps! I saw many have this issue.
PS: for react users I created a Mermaid hook for easy to use in your app, a screenshot for the fix for class diagram can be found in the link below :
https://github.com/DanShai/useMermaid-hook
The text was updated successfully, but these errors were encountered: