Skip to content
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

Add Id to Flowchart Links - Enable interactions and classes #4794

Open
Ogglas opened this issue Aug 31, 2023 · 2 comments
Open

Add Id to Flowchart Links - Enable interactions and classes #4794

Ogglas opened this issue Aug 31, 2023 · 2 comments

Comments

@Ogglas
Copy link
Contributor

Ogglas commented Aug 31, 2023

Proposal

I know it is possible to style Links with the syntax below but it would be useful to add interactions and use classes as well.

linkStyle 1 stroke:#ff3,stroke-width:4px,color:red;

https://mermaid.js.org/syntax/flowchart.html#styling-links

Would be good with a uniform solution for styling and also the possibility to interact with Links like the issue below:

Like this issue: #2305

Example

A suggestion would be to use a similar syntax as subgraph with subgraph ide1 [one].

It would then look something like this: A--textid [text]-->B

You could then add a click like this:

click textid callback "Tooltip for a callback"

Screenshots

No response

@Ogglas Ogglas added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Aug 31, 2023
@rockmasterflex69
Copy link

Is this potentially related to #4568?

Being able to define an ID for a link instead of being at the whim of the index is crucial for enabling dynamic styling and interactivity.

@sidharthv96
Copy link
Member

#4483 will help with not having to use IDs.

When deciding the syntax, we need to make sure it doesn't break the existing diagrams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants