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

circle and ellipse cannot change color by classDef #271

Closed
ygtzf opened this issue Dec 22, 2015 · 7 comments
Closed

circle and ellipse cannot change color by classDef #271

ygtzf opened this issue Dec 22, 2015 · 7 comments

Comments

@ygtzf
Copy link

ygtzf commented Dec 22, 2015

When I use mermaidAPI and mermaid.css, graph definiton like below:
graph LR;
A((start))-->B(step1);
B-->C[step2];
C-->D{step3};
D-->E[end];
classDef green fill:#9f6,stroke:#333,stroke-width:1px;
class A,B,C,D,E green;

But, the result is A node and D node is not green;
Please help me! Thanks!
@knsv
Copy link
Collaborator

knsv commented Dec 27, 2015

Thanks for raising this issue. Will take a look

knsv pushed a commit that referenced this issue Dec 27, 2015
@knsv
Copy link
Collaborator

knsv commented Dec 27, 2015

Found the issue and added those elements as well. The fix will be included in the next release.

@knsv knsv added the Fixed label Dec 27, 2015
@ygtzf
Copy link
Author

ygtzf commented Dec 28, 2015

Thanks very much.

@manor
Copy link

manor commented Dec 28, 2015

FWIW, this was also an issue nodes with an asymmetric shape (BTW, there is a typo in the docs where the section header is "A node in an asymetric shape" instead of "A node with an asymmetric shape"). If the fix mentioned above does not address this node shape, I can open the observation as a separate issue:

asymmetric shape does not take classDef color

<script src="https://cdn.rawgit.com/knsv/mermaid/0.5.6/dist/mermaid.min.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/knsv/mermaid/0.5.6/dist/mermaid.css">
<script>mermaid.initialize({startOnLoad:true});</script>
<div class="mermaid">
graph TD;
    A-->B(B)
    A-->C>C]
    B-->D((D))
    C-->D
classDef eco fill:green;
class A,B,C,D eco
</div>

@vnijs
Copy link

vnijs commented Feb 4, 2016

It seems circles are not colored (see @manor 's example above). The same fix implemented for ellipse seems to work fine for circles as well.

  • className + '>circle, .'

screen shot 2016-02-03 at 6 57 15 pm

@jsteave
Copy link

jsteave commented Mar 17, 2022

having the same issue.

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

No branches or pull requests

6 participants