-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
classDiagram cardinality not showing #602
Comments
As main maintainer is not available to fix that for the moment, I suggest delving into details here, so it helps him or whoever has time to fix it. I'll post my findings in this issue, and eventually I might look into submit a Merge Request. Technical understandingParserFrom my understanding of classDiagram parser : the parsing of cardinality looks like it's done within Renderer initializationFor each relations, the whole relation object we saw in the parser is passed to the "edge" within the graphlib graph. So we don't have to worry about how to pass our information to multiple layers of functions 🎉 Renderer last runNext let's check the drawEdge function We notice there is a title attached to a relation, its origin is not relevant but here it is Here begins some maths, somewhere from there there is magical code to put the title at half the length of the edge/path/relation, that will be useful to help us add code for our awaited cardinality to appear! 🎉 I'll continue if/when I have time, maths without comments scared me out 🐇 . At least I think I know exactly where to input code to make cardinality to work! |
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. |
…yarn/develop/lint-staged-12.2.1 chore(deps-dev): bump lint-staged from 12.2.0 to 12.2.1
Hi,
I'm using mermaid 7.0.17 in a classDiagram and I'm trying to show cardinality following the example in the specs. However cardinality is not being showed. I know it is an experimental feature, but I think it is worth to mention the problem to take it into consideration.
This is an example of how I'm using cardinality:
User "1" *-- "many" Session
EDIT: Also tested with 7.1
The text was updated successfully, but these errors were encountered: