Skip to content

supporting other mermaid types than graph #3

Open
@rishigoutam

Description

@rishigoutam

Hi, thank you for creating this!

I was trying to animate a mermaid flowchart and noticed it did not work as expected. A simple workaround was to write the flowchart as a graph. Hence, this might be a non-issue, but there might be others looking to animate various mermaid chart types so I wanted to post.

I wrote my markdown like so. Note that I used CAPS for the graph nodes--this is because lower case letters are cut off by the CSS, but that is a separate issue.

```mermaid
graph LR
    classDef start stroke-dasharray: 5 5
    classDef input stroke:#FFF,stroke-width:1px, fill:darkslateblue;
    classDef output stroke:#FFF,stroke-width:2px, fill:teal;

    START([START]):::start-->MARKDOWN[/"🔤 MARKDOWN"/]:::input-->PYPANDOC[["🐍 PANDOC"]]-->HTML[/"🙌 HTML"/]:::output
    PYPANDOC-->PDF[/"✨ PDF"/]:::output
    PYPANDOC-->DOCX[/"📄 DOCX"/]:::output
```
```mermaid-animation
START 
START-->MARKDOWN MARKDOWN
MARKDOWN-->PYPANDOC PYPANDOC
PYPANDOC-->HTML HTML
PYPANDOC-->PDF PDF
PYPANDOC-->DOCX DOCX
```
By adding some additional reveal-md slides, we can render the following animation

Note that the GIF quality is low. The animation is smoother locally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions