盒子
盒子
文章目录
  1. useful links
  2. Flowchart
  • bb
    1. Sequence Diagram
    2. State Diagram
    3. User Journey Diagram
    4. Gantt
    5. Pie chart diagrams
    6. Quadrant Chart
    7. Git graph
  • mermaid速查

    Flowchart

    flowchart LR
        A[fa:fa-ban A] & B--> C & D
      id1(Start)-->id2(Stop)
      style id1 fill:#f9f,stroke:#333,stroke-width:4px
      style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
      E:::someclass --> F
      classDef someclass fill:#f96
      p --> q[aa

    bb

    ]

    Sequence Diagram

    sequenceDiagram
        Alice->>+Bob: Hello Bob, how are you ?
        Bob->>-Alice: Fine, thank you. And you?
        participant Carl
        Alice->>Carl: Hi Carl!
        actor D as Donald
        activate D
        Carl-->>D: Hi!
        Alice-xCarl: We are too many
        deactivate D
        Bob->>Alice: I agree
    sequenceDiagram
        par Alice to Bob
            Alice->>Bob: Go help John
        and Alice to John
            Alice->>John: I want this done today
            par John to Charlie
                John->>Charlie: Can we do this today?
            and John to Diana
                John->>Diana: Can you help us today?
            end
        end
    sequenceDiagram
        critical Establish a connection to the DB
            Service-->DB: connect
        option Network timeout
            Service-->Service: Log error
        option Credentials rejected
            Service-->Service: Log different error
        end
    sequenceDiagram
        participant Alice
        participant John
    
        rect rgb(191, 223, 255)
        note right of Alice: Alice calls John.
        Alice->>+John: Hello John, how are you?
        rect rgb(200, 150, 255)
        Alice->>+John: John, can you hear me?
        John-->>-Alice: Hi Alice, I can hear you!
        end
        John-->>-Alice: I feel great!
        end
        Alice ->>+ John: Did you want to go to the game tonight?
        John -->>- Alice: Yeah! See you there.

    State Diagram

    stateDiagram-v2
        [*] --> Still
        Still --> [*]
    
        Still --> Moving
        Moving --> Still
        Moving --> Crash
        Crash --> [*]

    User Journey Diagram

    journey
        title My working day
        section Go to work
          Make tea: 5: Me
          Go upstairs: 3: Me
          Do work: 1: Me, Cat
        section Go home
          Go downstairs: 5: Me
          Sit down: 5: Me

    Gantt

    gantt
        dateFormat  YYYY-MM-DD
        title       Adding GANTT diagram functionality to mermaid
        excludes    weekends
        %% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)
    
        section A section
        Completed task            :done,    des1, 2014-01-06,2014-01-08
        Active task               :active,  des2, 2014-01-09, 3d
        Future task               :         des3, after des2, 5d
        Future task2              :         des4, after des3, 5d
    
        section Critical tasks
        Completed task in the critical line :crit, done, 2014-01-06,24h
        Implement parser and jison          :crit, done, after des1, 2d
        Create tests for parser             :crit, active, 3d
        Future task in critical line        :crit, 5d
        Create tests for renderer           :2d
        Add to mermaid                      :1d
        Functionality added                 :milestone, 2014-01-25, 0d
    
        section Documentation
        Describe gantt syntax               :active, a1, after des1, 3d
        Add gantt diagram to demo page      :after a1  , 20h
        Add another diagram to demo page    :doc1, after a1  , 48h
    
        section Last section
        Describe gantt syntax               :after doc1, 3d
        Add gantt diagram to demo page      :20h
        Add another diagram to demo page    :48h

    Pie chart diagrams

    pie title Pets adopted by volunteers
        "Dogs" : 386
        "Cats" : 85
        "Rats" : 15

    Quadrant Chart

    quadrantChart
        title Reach and engagement of campaigns
        x-axis Low Reach --> High Reach
        y-axis Low Engagement --> High Engagement
        quadrant-1 We should expand
        quadrant-2 Need to promote
        quadrant-3 Re-evaluate
        quadrant-4 May be improved
        Campaign A: [0.3, 0.6]
        Campaign B: [0.45, 0.23]
        Campaign C: [0.57, 0.69]
        Campaign D: [0.78, 0.34]
        Campaign E: [0.40, 0.34]
        Campaign F: [0.35, 0.78]

    Git graph

    gitGraph:
        commit "Ashish"
        branch newbranch
        checkout newbranch
        commit id:"1111"
        commit tag:"test"
        checkout main
        commit type: HIGHLIGHT
        commit
        merge newbranch
        commit
        branch b2
        commit
    支持一下
    扫一扫,支持nekko
    • 微信扫一扫