dot DOT条件

dot-conditional
{{? it.name }}
<div>Oh, I love your name, {{=it.name}}!</div>
{{?? it.age === 0}}
<div>Guess nobody named you yet!</div>
{{??}}
You are {{=it.age}} and still don't have a name?
{{?}}

dot DOT数组

dot-array
{{= it.include("my-include-file.html", {
	"array" : [
         {"id":"experience-meetings", "text": "Experience meetings"},
         {"id":"conference-rooms", "text": "Conference rooms & floor plans"},
         {"id":"food-drinks", "text": "Food & drinks"},
         {"id":"meeting-packages", "text": "Meeting packages & deals"},
         {"id":"innovative-technology", "text": "Innovative Technology"},
         {"id":"business-bonus", "text": "Rewards for business bonus program"}
      ],
}) }}

//my-include-file.html
{{~it.array :value:index}}
 <li class="nav-item {{=index == 0 ? 'active': ''}}">
    < id="{{=value.id}}-tab">{{=value.text}}</a>
 </li>
{{~}}

dot visualize-ms-arch-step-2.dot

visualize-ms-arch-step-2.dot
digraph architecture {
  rankdir=LR;

  // Storage - #303F9F (dark blue)
  node[fillcolor="#303F9F" style="filled" fontcolor="white"];
  database[label="DB"]; cache[label="Redis"];
  
  // Client-side Apps - #FFEB3B (yellow)
  node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
  front_end[label="Front-end App"]; extension[label="Browser Extension"];
  
  // Microservices - #C8E6C9 (light green)
  node[fillcolor="#C8E6C9" style="filled" fontcolor="black"];
  photos_ms[label="Photos MS"]; chats_ms[label="Chats MS"]; friends_ms[label="Friends MS"];
  
  // API Gateways - #FFCCBC (light orange)
  node[fillcolor="#FFCCBC" style="filled" fontcolor="black"];
  auth_api[label="Auth API"]; my_app_api[label="Main API"];
  
  // 3rd-party APIs - #CFD8DC (light grey)
  node[fillcolor="#CFD8DC" style="filled" fontcolor="black"];
  facebook_api[label="Facebook API"];
  
  subgraph client_side_apps {
      front_end -> {auth_api, my_app_api};
      extension -> {auth_api, my_app_api};
      
      {rank=same; front_end, extension, auth_api};
  }
  
  subgraph api_gateways {
      my_app_api -> {photos_ms, chats_ms, friends_ms};
  }
  
  subgraph microservices {
      photos_ms -> {database};
      chats_ms -> {database, cache};
      friends_ms -> {database, facebook_api};
  }
}

dot 点阵绘图代码

点阵绘图代码

BaseCode.dot
digraph abc{
  node[shape=record,fontname="FangSong"]//上的属性将影响下面的node.,中文必须用UTF8格式,并且显示设置字体名
  //设置字体似乎会解决中文显示错误
   a1 [label="<f0> S'-\>·S$|<f1> S-\>·xxT"];
   //只有record形状才能使用<xxx>来添加端点,和'|','{}'.且label中不能有'>'需要转移
   a2 [label="S-\>x·xT"];

  //设置a1的f1节点指向a2的西边,只有record形状才能用<f0>来设置节点
  a1:f1 -> a2:w [label="X"];
  
}

dot ala-cas的邻接列表(graphviz DOT风格)

ala-cas的邻接列表(graphviz DOT风格)

test.dot
ala-cas -> ala-header-and-tails;
ala-cas -> c3p0;
ala-cas -> cas-server-core;
ala-cas -> cas-server-integration-restlet;
ala-cas -> cas-server-support-generic;
ala-cas -> cas-server-support-jdbc;
ala-cas -> cas-server-webapp;
ala-cas -> commons-codec;
ala-cas -> hibernate-entitymanager;
ala-cas -> hsqldb;
ala-cas -> junit;
ala-cas -> mysql-connector-java;

dot ALA CAS重构

ALA CAS重构

ala-deps-test.dot
digraph ALA {
	label="Atlas of Living Australia dependencies";
	labelloc="t";
	labeljust="c";

	rankdir=LR;

	node [shape=box,
	      style=filled,
	      fillcolor=gray80,
	      color=gray80,
	      fixedsize=true,
	      height=0.25,
	      width=3.0,
	      fontname="DejaVu Sans Mono",
	      fontcolor=black,
	      fontsize=8];

        ala-cas              [ label="ala-cas", fillcolor=$java_project_color , color=$java_project_color ];
        ala-cas-client       [
        ala-collectory       [
        ala-common-ui        [
        ala-downloads        [
        ala-header-and-tails [
        ala-hub              [ label="", ]
        ala-install          [
        ala-logger           [
        ala-name-matching    [
        ala-names-generator  [
        ala-parent-pom
        ala-soils2sat
        ala-web-theme
        ala-wp-theme-2011
        ALA4R
        alageospatialportal
        alerts
        amrin-hub
        analysis-service
        apikey
        appd-hub
        asbp-hub
        avh-hub
        bhl-demo-app
        bhl-ftindex-manage
        bhl-ftindexer
        bhl-solr-plugin
        bie-profile
        bie-service
        bie-webapp2
        biocache-hubs
        biocache-jms
        biocache-service
        biocache-store
        collectory
        collectory-plugin
        dashboard
        ecodata
        expert
        fieldcapture
        fieldcapture-hubs
        fieldcapture-mobile
        fielddata
        fielddata-android
        fielddata-mobile
        fielddata-proxy
        fieldguide
        generic-collectory
        generic-hub
        image-loader
        image-service
        image-tiling-agent
        image-utils
        images-client-plugin
        layer-ingestion
        layers-service
        layers-store
        logger-service
        obis-hub
        opentree-install
        ozatlas
        ozatlas-android
        ozatlas-proxy
        ozcam-hub
        phylolink
        pigeonhole
        regions
        sandbox
        sds
        sds-webapp2
        sightings
        spatial-database
        spatial-logger
        spatial-portal
        specieslist-webapp
        specimenbrowser
        taxon-overflow
        tepapa-hub
        tviewer
        userdetails
        volunteer-portal
        webapi
}
ala-cas_refactoring-test.dot
ala-cas              -> cas;
ala-cas              -> ala-header-and-tails;
ala-cas-client       -> cas-client;
ala-header-and-tails -> ala-cas-client;
ala-header-and-tails -> cas-client;
ala-web-theme        -> ala-cas-client;
ala-web-theme        -> cas-client;

ala-hub              -> ala-web-theme;
expert               ->	cas-client;
expert               -> ala-cas-client;
fieldcapture         -> ala-web-theme;