-
Notifications
You must be signed in to change notification settings - Fork 247
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
class & classDef not working for mermaid graph? #81
Comments
I was about to post the same bug. I am under Windows. Color are not displayed anymore. I notice that this example doesn't work anymore (use class def)
But this example works (color are used but no class / classDef):
Kind regards, |
@happyshows and @pommedeterresautee I think I just need to do some testing. |
@pommedeterresautee @jennybc Michaël, I noticed you have some issue displaying colors and this same issue came up recently. Could you run the code in the gist at https://gist.github.com/rich-iannone/3db4fa95f27ba28fabe4 and let me know if colors display or not? Trying to diagnose the cause of this. |
@rich-iannone I think this issue is with |
Yeah, true, and I'm probably grasping at straws, but I thought there might be some underlying reason. |
pretty sure with big and rapid changes in |
actually appears to be css priority preference; can't imagine that bare mermaid is working either. Prob will have to file issue over there. |
looks like this was partially addressed in mermaid-js/mermaid#128 |
explains why the more specific id works, but the general class name does not |
Installed last version from Github and it works now on my Ubuntu machine (was not working before updating, like on Windows laptop). Will try later on Windows. |
colors work with the github version on windows but now the arrow heads disappeared, which works with the cran version (with no color)... another thing with the CSS styling in mermaid...I am trying the make the font larger with font-size: argument but even when you do make the font larger the problem is that the node size stays the same and the text inside nodes becomes not readable and I couldn't find a solution to make nodes larger as well.. I don't know if this is the right place for this kinds of requests but I wish I could play more with styling options in mermaid such as diagram title, node size (as mentioned above), and font size of the text between nodes along the connection lines, and possibility of adding a legend, etc.. thanks for the great package..looking forward to new features.. abdulkerim |
@abdulkerimgok there has been a request to reference a CSS stylesheet and I think it's a good feature to have (Graphviz allows this with an XML stylesheet). So, this will be worked on. |
@rich-iannone just checking in to see if the first part of @abdulkerimgok comment above on Mar 23 regarding the arrow heads missing in windows is being wrapped up under this issue or not. Seeing the same behavior, arrow heads appear in Mavericks but not in Windows 7 (using both DiagrammeR v0.6 and github dev version). Thanks, love the package and looking forward to implementing some of your latest grViz features into my (very nascent) 'muir' package. |
Quick update on the "missing arrow heads" in Windows. The arrow heads are not showing in the RStudio viewer (v0.98.1103) but if I save the htmlwidget to an HTML file, the arrows appear, at least in Chrome and Firefox. |
d <- "graph LR
A[Hard edge] -->|Link text| B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]
classDef test fill:#A2EB86,stroke:#777,stroke-width:4px;
class B test;
"
mermaid(d)
The text was updated successfully, but these errors were encountered: