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 subgraph? #391

Closed
sinedied opened this issue Sep 30, 2016 · 21 comments · Fixed by #845
Closed

Styling subgraph? #391

sinedied opened this issue Sep 30, 2016 · 21 comments · Fixed by #845
Labels
Status: Approved Is ready to be worked on

Comments

@sinedied
Copy link
Contributor

It would be nice to be allow to style subgraph, the same way we can style nodes, for example like this to change subgraph background color:

graph TD
  subgraph A
    B-->C
    B-->D
    C-.-D
  end
  D-->E
  classDef red fill:#fdc
  class A red

What do you think?

@knsv
Copy link
Collaborator

knsv commented Sep 30, 2016

I think its a great feature! And it is a great small functionality to start with for someone who want to to try to contribute.

@WalshJP
Copy link

WalshJP commented Jan 8, 2017

I'll take this feature!

@knsv
Copy link
Collaborator

knsv commented Jan 9, 2017

That stunds great. It's yours!

@knsv knsv added Status: Approved Is ready to be worked on and removed Contributor needed labels Jan 9, 2017
@y9c
Copy link

y9c commented Mar 20, 2017

Is that finished yet?

@tscislo-lingaro
Copy link

Any progress on this?

@MoeweX
Copy link

MoeweX commented May 21, 2017

Also interested, any progress yet?

@pchaganti
Copy link

👍

@joeto0
Copy link

joeto0 commented Nov 2, 2017

any news?

@beardedeagle
Copy link

where are we with this?

@dkiser
Copy link

dkiser commented Mar 2, 2018

Looking forward to this as well ;)

@kbsizer
Copy link

kbsizer commented Mar 30, 2018

This would really be handy about now.
Any hope of adding this soon-ish?

@djoffe
Copy link

djoffe commented May 24, 2018

@knsv This would be a really handy feature, but it does not look like @WalshJP is aware this is assigned to him...
Maybe remove the assigned tag and put it back for grabs?

@TKappatsch
Copy link

Need it here as well

@fchiorascu
Copy link

@omerbensa
Copy link

Bump

1 similar comment
@ianqueue
Copy link

Bump

@Qix-
Copy link
Contributor

Qix- commented May 24, 2019

Here's the downside: subgraph titles are also their IDs in OP's case. There would have to be a change to the DSL, something like:

subgraph some-id[Some Subgraph Title]
...
end
Loading

This is because the following is currently valid mermaid:

subgraph Some Subgraph Title
...
end
Loading

@Qix-
Copy link
Contributor

Qix- commented May 26, 2019

Submitted #845, which adds styling. Unfortunately, the maintainer seems to be absent.

@knsv
Copy link
Collaborator

knsv commented May 28, 2019

Wow! A fix for this one, wonderful!

@knsv knsv closed this as completed in #845 May 28, 2019
tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this issue Jul 30, 2019
Mermaid v8.2.3 added support for styling in subgraphs, but if there are
multiple words in a title, quotes are required.

```
graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph "SubGraph 1 Flow"
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph "Main Graph"
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]
end
```

```
graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph SubGraph 1 Flow
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph Main Graph
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]
end
```

* mermaid-js/mermaid#845
* mermaid-js/mermaid#391 (comment)

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this issue Jul 31, 2019
Mermaid v8.2.3 added support for styling in subgraphs, but if there are
multiple words in a title, quotes are required.

```
graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph "SubGraph 1 Flow"
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph "Main Graph"
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]
end
```

```
graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph SubGraph 1 Flow
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph Main Graph
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]
end
```

* mermaid-js/mermaid#845
* mermaid-js/mermaid#391 (comment)

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this issue Jul 31, 2019
Mermaid v8.2.3 added support for styling in subgraphs, but if there are
multiple words in a title, quotes are required.

```
graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph "SubGraph 1 Flow"
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph "Main Graph"
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]
end
```

```
graph TB

  SubGraph1 --> SubGraph1Flow
  subgraph SubGraph 1 Flow
  SubGraph1Flow(SubNode 1)
  SubGraph1Flow -- Choice1 --> DoChoice1
  SubGraph1Flow -- Choice2 --> DoChoice2
  end

  subgraph Main Graph
  Node1[Node 1] --> Node2[Node 2]
  Node2 --> SubGraph1[Jump to SubGraph1]
  SubGraph1 --> FinalThing[Final Thing]
end
```

* mermaid-js/mermaid#845
* mermaid-js/mermaid#391 (comment)

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this issue Jul 31, 2019
Mermaid v8.2.3 added support for styling in subgraphs, but if there are
multiple words in a title, quotes are required.

* mermaid-js/mermaid#845
* mermaid-js/mermaid#391 (comment)

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this issue Aug 2, 2019
Mermaid v8.2.3 added support for styling in subgraphs, but if there are
multiple words in a title, quotes are required.

* mermaid-js/mermaid#845
* mermaid-js/mermaid#391 (comment)

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65338
@fbertoia
Copy link

Why this issue has been closed ? It is not yet fixed, isn't it ?

@klemmchr
Copy link
Member

It meant to be closed with #845. If this issue persists for you please create a new one with a reproduction sample.

@mermaid-js mermaid-js locked as resolved and limited conversation to collaborators Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Approved Is ready to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.