zoukankan      html  css  js  c++  java
  • Typora绘图

    Sequence(时序图)

    依托于js-sequence实现

    简单样例

    对象A->对象B: 对象B你好吗?(请求)
    
    Note right of 对象B: 对象B的描述
    
    Note left of 对象A: 对象A的描述(提示)
    
    对象B-->对象A: 我很好(响应)
    
    对象A->对象B: 你真的好吗?
    
    

    复杂样例

    Title: 标题:复杂使用
    
    对象A->对象B: 对象B你好吗?(请求)
    
    Note right of 对象B: 对象B的描述
    
    Note left of 对象A: 对象A的描述(提示)
    
    对象B-->对象A: 我很好(响应)
    
    对象B->小三: 你好吗
    
    小三-->>对象A: 对象B找我了
    
    对象A->对象B: 你真的好吗?
    
    Note over 小三,对象B: 我们是朋友
    
    participant C
    
    Note right of C: 没人陪我玩
    
    

    flow(流程图)

    依托于flowchart.js实现

    横向

    st=>start: 开始框
    
    op=>operation: 处理框
    
    cond=>condition: 判断框(是或否?)
    
    sub1=>subroutine: 子流程
    
    io=>inputoutput: 输入输出框
    
    e=>end: 结束框
    
    st(right)->op(right)->cond
    
    cond(yes)->io(bottom)->e
    
    cond(no)->sub1(right)->op
    
    

    竖向

    st=>start: 开始框
    
    op=>operation: 处理框
    
    cond=>condition: 判断框(是或否?)
    
    sub1=>subroutine: 子流程
    
    io=>inputoutput: 输入输出框
    
    e=>end: 结束框
    
    st->op->cond
    
    cond(yes)->io->e
    
    cond(no)->sub1(right)->op
    
    

    mermaid

    结合Mermaid,支持了Mermaid模式下的时序图(sequence),流程图(flowchart)和甘特图(Gantt)

    时序图

    样例

    %% 时序图例子,-> 直线,-->虚线,->>实线箭头 sequenceDiagram participant 张三 participant 李四 张三->王五: 王五你好吗? loop 健康检查 王五->王五: 与疾病战斗 end Note right of 王五: 合理 食物 <br/>看医生... 李四-->>张三: 很好! 王五->李四: 你怎么样? 李四-->王五: 很好!

    流程图

    横向

    graph LR A[方形] -->B(圆角) B --> C{条件a} C -->|a=1| D[结果1] C -->|a=2| E[结果2] F[横向流程图]

    竖向

    graph TD A[方形] -->B(圆角) B --> C{条件a} C -->|a=1| D[结果1] C -->|a=2| E[结果2] F[竖向流程图]

    甘特图

    样例

    %% 语法示例 gantt dateFormat YYYY-MM-DD title 软件开发甘特图 section 设计 需求 :done, des1, 2014-01-06,2014-01-08 原型 :active, des2, 2014-01-09, 3d UI设计 : des3, after des2, 5d 未来任务 : des4, after des3, 5d section 开发 学习准备理解需求 :crit, done, 2014-01-06,24h 设计框架 :crit, done, after des2, 2d 开发 :crit, active, 3d 未来任务 :crit, 5d 耍 :2d section 测试 功能测试 :active, a1, after des3, 3d 压力测试 :after a1 , 20h 测试报告 : 48h

    样例二

    %% Example with selection of syntaxes gantt dateFormat YYYY-MM-DD title Adding GANTT diagram functionality to mermaid 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 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

    参考:

    typora画流程图、时序图(顺序图)、甘特图

    Markdown里面使用mermaid画流程图(基础)

    Draw Diagrams With Markdown

    mermaid

    使用Typora Markdown画图

  • 相关阅读:
    git的merge功能
    linux实用命令
    记录maven的一些命令
    java模拟报文
    spring boot利用swagger和spring doc生成在线和离线文档
    java将类和函数封装成jar
    spring cloud微服务搭建(一)
    linux根目录扩容
    快速上手UIView动画
    PHP变量
  • 原文地址:https://www.cnblogs.com/hongdada/p/12166733.html
Copyright © 2011-2022 走看看