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

Styling components of the sequence diagram #523

Open
CyborgMaster opened this issue Apr 20, 2017 · 84 comments
Open

Styling components of the sequence diagram #523

CyborgMaster opened this issue Apr 20, 2017 · 84 comments

Comments

@CyborgMaster
Copy link

I would love to be able to style the actor boxes and possibly arrows of the sequence diagram in a similar way that you allow styling the nodes and links of the flowcharts. I believe that a similar (if not identical) syntax should work.

@pchaganti
Copy link

👍

@2pl
Copy link

2pl commented Nov 5, 2017

+1 for this, styling helps making larger sequence diagrams easier to read.
Lack of styling in mermaid is indeed the only reason I stick to mscgen for sequence diagrams.

As @CyborgMaster suggested, something similar to flowchart styling would be great

sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
    style Alice fill:#f9f,stroke:#333,stroke-width:4px

@bindulaxminarayan
Copy link

+1 for this

@kbatman37
Copy link

+1

@stale
Copy link

stale bot commented Jun 29, 2019

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.

@stale stale bot added the Type: New Shape Request for new shape label Jun 29, 2019
@CyborgMaster
Copy link
Author

This seemed to be a popular request, I don't think it should be archived.

@stale stale bot removed the Type: New Shape Request for new shape label Jul 1, 2019
@antoniomolram
Copy link

I think this issue need to be revisited. The styling is working on Graph TD but not on sequenceDiagram. At least I was not able to figure out how to apply any style on a sequenceDiagram.

Thank you in advance

@rajasekaran2003
Copy link

This would be a great addition !!

@IOrlandoni IOrlandoni added Area: Development Graph: Sequence Status: Pending Is not to be executed as it currently is Type: Enhancement New feature or request labels Oct 3, 2019
@smadala
Copy link

smadala commented Dec 27, 2019

@dunning-kruger
Looking forward for this support.

@handzlikchris

This comment has been minimized.

@IOrlandoni

This comment has been minimized.

@riapacheco
Copy link

This would be great -- sequences do require a lot of differentiation!

@sd597p
Copy link

sd597p commented Nov 23, 2020

yes please. Need to differentiate some of the components.

@bip91
Copy link

bip91 commented Dec 8, 2020

Yes, another up for this feature ;-)

@cristianvasquez
Copy link

+1

1 similar comment
@Lloydshove
Copy link

+1

@Lloydshove
Copy link

Not being able to style to highlight things e.g. "these participants/services are new" is nearly a show stopper for me

@jgreywolf jgreywolf added Status: Approved Is ready to be worked on Topic: Styling Contributor needed and removed Status: Pending Is not to be executed as it currently is labels Feb 1, 2021
@pe7r
Copy link

pe7r commented Mar 29, 2021

+1

@Elvis10ten
Copy link

+1

@sidharthv96
Copy link
Member

@jgreywolf are you working on this? If not, we can remove the assignment and open it up for the community.

@rafaell22
Copy link

Hey, is anyone working on this one? May I try as my first issue?

@YouXam
Copy link

YouXam commented Oct 2, 2023

One possible way is to set color manually after rendering:

mermaid.run({
  querySelector: '.mermaid',
  postRenderCallback: () => {
    document.querySelectorAll(".arrowMarkerPath").forEach(item => {
      item.style.fill = "white";
    });
  }
});

@duaneking
Copy link

Ran into this today; I wanted to take a state diagram and make some nodes red and others green., to highlight the path a state transition took.

@Cool-PKY
Copy link

Cool-PKY commented Feb 2, 2024

Anything updates?

@wico-heuschkel
Copy link

+1

2 similar comments
@zguesmi
Copy link

zguesmi commented Feb 14, 2024

+1

@covapps
Copy link

covapps commented Feb 18, 2024

+1

@funnybunnyQAQ
Copy link

+10000

@suresh12
Copy link

suresh12 commented Jul 1, 2024

+100

@cdelmas34
Copy link

+1

7 similar comments
@devinmori
Copy link

+1

@KitsanapongRodj
Copy link

+1

@swarajban
Copy link

+1

@nitaiaharoni1
Copy link

+1

@vladpactum
Copy link

+1

@dnrahamim
Copy link

+1

@Aaron-cdx
Copy link

+1

@SvenRelijveld1995
Copy link

+1!

@LouDnl
Copy link

LouDnl commented Oct 15, 2024

+1

2 similar comments
@kdoubner
Copy link

+1

@andrewgohlk
Copy link

+1

@tekiegirl
Copy link

+1 over 7.5 years after this request was initially opened...
Any idea if this will ever be looked at?

@kyouheicf
Copy link

+1

@jgreywolf
Copy link
Contributor

There are these two options currently:
http://mermaid.js.org/syntax/sequenceDiagram.html#background-highlighting
http://mermaid.js.org/syntax/sequenceDiagram.html#styling

If someone would like to take this on, that would be great :)

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