diff --git a/docs/Setup.md b/docs/Setup.md index 6c7a1e32a..1f948ee01 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -13,7 +13,7 @@ using the default integration provided by mermaid.js. The core of this api is the [**render**][2] function which, given a graph definition as text, renders the graph/diagram and returns an svg element for the graph. -It is is then up to the user of the API to make use of the svg, either insert it somewhere in the +It is then up to the user of the API to make use of the svg, either insert it somewhere in the page or do something completely different. In addition to the render function, a number of behavioral configuration options are available. diff --git a/docs/classDiagram.md b/docs/classDiagram.md index 13b30714d..1576aaa17 100644 --- a/docs/classDiagram.md +++ b/docs/classDiagram.md @@ -3,8 +3,7 @@ # Class diagrams > "In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects." -> -> - Wikipedia +> Wikipedia The class diagram is the main building block of object-oriented modeling. It is used for general conceptual modeling of the structure of the application, and for detailed modeling to translate the models into programming code. Class diagrams can also be used for data modeling. The classes in a class diagram represent both the main elements, interactions in the application, and the classes to be programmed. @@ -595,12 +594,32 @@ Beginner's tip—a full example using interactive links in an HTML page: ```html
-+ classDiagram + Animal <|-- Duck + Animal <|-- Fish + Animal <|-- Zebra + Animal : +int age + Animal : +String gender + Animal: +isMammal() + Animal: +mate() + class Duck{ + +String beakColor + +swim() + +quack() + } + class Fish{ + -int sizeInFeet + -canEat() + } + class Zebra{ + +bool is_wild + +run() + } + + callback Duck callback "Tooltip" + link Zebra "https://www.github.com" "This is a link" +Here is one mermaid diagram: -
+ graph TD + A[Client] --> B[Load Balancer] + B --> C[Server1] + B --> D[Server2] +And here is another: -
+ graph TD + A[Client] -->|tcp_123| B + B(Load Balancer) + B -->|tcp_456| C[Server1] + B -->|tcp_456| D[Server2] +