饼图
pie title Pets adopted by volunteers "Dogs" : 386 "Cats" : 85 "Rats" : 15
状态图
通过建立对象的生存周期模型来描述对象随时间变化的动态行为
stateDiagram Start --> First First --> Second First --> Third Second --> End Third --> End state First { [*] --> fir fir --> [*] } state Second { [*] --> sec sec --> [*] } state Third {}
class类图
面向对象的编程会经常看到类,类与类有所属关系。比如中国人是人类的一员,而人类又隶属于灵长类动物。
classDiagram Animal <|-- Duck Animal <|-- Fish Animal <|-- Zebra Animal : int age Animal : String gender Animal: isMammal() Animal: mate() class Duck{ String beakColor swim() quack() } class Fish{ int sizeInFeet canEat() } class Zebra{ bool is_wild run() eat() }
这里是脚注信息 ↩︎