Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to style an Entity Relation Diagram with Mermaid.js like Flowcharts to indicate a difference in entities?

Tags:

erd

mermaid

I can't seem to style any elements within my ERD.

Having an entity called PERSON, any of the following code results in a syntax error:

style PERSON fill:#f9f;

or

classDef className fill:#f9f; 
class PERSON className;

or

classDef default fill:#f9f;

Looking at the documentation, I should be able to use simple styling: https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram?id=styling

Basically I'm trying to make a high level ERD where I need to mark certain entities to indicate a difference.

Any help or advice would be appreciated. :-)

like image 895
Rick Van Boxstael Avatar asked Dec 09 '25 03:12

Rick Van Boxstael


1 Answers

Well the documentation and issue were updated 4 months after my answer, thus "Yes" it's possible to style erDiagrams. You have to start with the base style though.

like image 54
Douglas M Avatar answered Dec 12 '25 00:12

Douglas M



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!