Overview
3-Minute Infographic - Boost Productivity with ChatGPT + Mermaid
Today I’d like to share the diagramming tools I use in practice and how I combine them, hoping to help friends who love using visualization to illustrate their logic.
Actually, diagram-as-code tools have been around for a while; it’s just that ChatGPT makes this task even easier.
Features of today’s introduced tool:
- π Free to use on a web page.
- π Quickly generate flowcharts, mindmaps, pie charts, Gantt charts, timelines, user journeys, and more.
- π Uses markdown syntax, easy to learn even without an engineering background, convenient for version control.
π€ Q: What kind of charts would you typically use ChatGPT + Mermaid to assist you with in your daily work?
πͺ A: Choose an example and actually draw a chart using the online editor.
What is Mermaid
JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.
The official website directly provides an online editor called Mermaid Live Editor.
The Mermaid official tutorial documentation offers a variety of syntax examples to refer to. Approximately 15 types of charts can be drawn, divided into two categories below:
1. Flowchart
2. Timeline
3. Gantt
(The Gantt chart may appear strange when viewed on a mobile phone, but there will be no issues when viewed on a computer webpage.)
4. Pie chart
5. User Journey
6. Mindmaps
Since I’m not used to using radial mind maps, I use Markmap to generate mindmaps.
Other engineering-related tools
Please refer to the official documentation for the following:
- Sequence Diagram
- Class Diagram
- State Diagram
- Entity-Relationship (ER) Diagram
- π₯ Gitgraph
- C4C diagram
Practical Applications of ChatGPT + Mermaid
You might wonder that the Mermaid markdown syntax still looks a bit complicated. That’s right! That’s why we let ChatGPT help us generate the syntax templates. It’s recommended to choose tasks that ChatGPT is good at, such as generating, summarizing, translating, and so on.
In my example, using a Markmap mind map is more convenient, and Mermaid follows the same principle. So, we can achieve the following things in just 3 minutes:
- π€ ChatGPT: ChatGPT: Use a Prompt to generate the needed content
- π Mermaid Live Editor: Directly input the content into Mermaid to generate the chart
- π Done!
For example, if you want to summarize this article, you can use the following Prompt:
Get the markdown below:
Paste it into Markmap to generate the mind map, which becomes the cover image of this article.
The Mermaid version uses a flowchart, which is more my style:
|
|
By the way, I don’t know why the Mermaid results generated by GPT-3.5 are better than those by GPT-4. If you have any experience, feel free to leave a comment and share~
Other tools
- Miro: When I want to draw more highly customized block diagrams or other charts, I prioritize Miro. I love the large whiteboard, where I can put many draft ideas together with the final version.
- diagrams.net (formerly known as draw.io): The charting tool is actually renamed to diagrams.net, but everyone still calls it Draw.io. Its advantage lies in having many built-in components when drawing complete architecture diagrams. But aligning the components by dragging them can be quite painful…
- Excalidraw: A hand-drawn-style charting tool. I used it for a while before switching to Miro.
- PlantUML: A tool often compared to Mermaid. It has a more classic interface. I used it in the past, but not so much now.
- vs code extension
What do you think?
Let’s discuss thoughts together! π₯³
Murmur
- 2023-04-20: Everything as Code belief π€£