Book Image

The Official Guide to Mermaid.js

By : Knut Sveidqvist, Ashish Jain
Book Image

The Official Guide to Mermaid.js

By: Knut Sveidqvist, Ashish Jain

Overview of this book

Mermaid is a JavaScript-based charting and diagramming tool that lets you represent diagrams using text and code, which simplifies the maintenance of complex diagrams. This is a great option for developers as they’re more familiar with code, rather than using special tools for generating diagrams. Besides, diagrams in code simplify maintenance and ensure that the code is supported by version control systems. In some cases, Mermaid makes refactoring support for name changes possible while also enabling team collaboration for review distribution and updates. Developers working with any system will be able to put their knowledge to work with this practical guide to using Mermaid for documentation. The book is also a great reference for looking up the syntax for specific diagrams when authoring diagrams. You’ll start by learning the importance of accurate and visual documentation. Next, the book introduces Mermaid and establishes how to use it to create effective documentation. By using different tools, editors, or a custom documentation platform, you’ll also understand how to use Mermaid syntax for various diagrams. Later chapters cover advanced configuration settings and theme options to manipulate your diagram as per your needs. By the end of this book, you’ll be well-versed with Mermaid diagrams and how they can be used in your workflows.
Table of Contents (19 chapters)
1
Section 1: Getting Started with Mermaid
7
Section 2: The Most Popular Diagrams
12
Section 3: Powerful Diagrams for the Advanced User

Summary

It is a wrap for this chapter. You now have mastered Gantt chart generation using Mermaid. You learned about the basics: what is a Gantt chart, what its various components are, and how it is represented graphically. You learned about the syntax of a Gantt chart and how to declare your sections and task definitions. You learned how to add tags such as active, crit, milestone, or done to a task. You can now use different ways to define a timeline for a task, using actual start or end dates or making it dependent on another task completions. You were exposed to the optional parameters with which you can set the title and I/O date formats. You can now control the current date marker and its styling. You understood the concept of excluding certain dates and days from a timeline, and how to make the end date defined as inclusive in timeline calculations.

You learned the various configuration options available for altering a Gantt chart, such as enabling the top axis, adjusting...