{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-ast-293603dad5ee3e761aad102248683b9e-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"G6 内置了圆 Circle 节点，其默认样式如下。标签文本位于圆形中央。","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":38,"offset":38},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":2,"column":38,"offset":38},"end":{"line":2,"column":44,"offset":44},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570866540667-b43bfc15-a839-47cc-a25f-b5da1151cec9.png#align=left&display=inline&height=60&name=image.png&originHeight=120&originWidth=124&search=&size=13933&status=done&width=62","alt":"image.png","position":{"start":{"line":2,"column":44,"offset":44},"end":{"line":2,"column":282,"offset":282},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":282,"offset":282},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#使用方法","title":null,"children":[],"data":{"hProperties":{"aria-label":"使用方法 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"使用方法","position":{"start":{"line":4,"column":4,"offset":287},"end":{"line":4,"column":8,"offset":291},"indent":[]}}],"position":{"start":{"line":4,"column":1,"offset":284},"end":{"line":4,"column":8,"offset":291},"indent":[]},"data":{"id":"使用方法","htmlAttributes":{"id":"使用方法"},"hProperties":{"id":"使用方法"}}},{"type":"paragraph","children":[{"type":"text","value":"如 ","position":{"start":{"line":5,"column":1,"offset":292},"end":{"line":5,"column":3,"offset":294},"indent":[]}},{"type":"link","title":null,"url":"../defaultNode","children":[{"type":"text","value":"内置节点","position":{"start":{"line":5,"column":4,"offset":295},"end":{"line":5,"column":8,"offset":299},"indent":[]}}],"position":{"start":{"line":5,"column":3,"offset":294},"end":{"line":5,"column":25,"offset":316},"indent":[]}},{"type":"text","value":" 一节所示，配置节点的方式有两种：实例化图时全局配置，在数据中动态配置。","position":{"start":{"line":5,"column":25,"offset":316},"end":{"line":5,"column":61,"offset":352},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":292},"end":{"line":5,"column":61,"offset":352},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#1-实例化图时全局配置","title":null,"children":[],"data":{"hProperties":{"aria-label":"1 实例化图时全局配置 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"1 实例化图时全局配置","position":{"start":{"line":8,"column":5,"offset":359},"end":{"line":8,"column":16,"offset":370},"indent":[]}}],"position":{"start":{"line":8,"column":1,"offset":355},"end":{"line":8,"column":16,"offset":370},"indent":[]},"data":{"id":"1-实例化图时全局配置","htmlAttributes":{"id":"1-实例化图时全局配置"},"hProperties":{"id":"1-实例化图时全局配置"}}},{"type":"paragraph","children":[{"type":"text","value":"用户在实例化 Graph 时候可以通过 ","position":{"start":{"line":9,"column":1,"offset":371},"end":{"line":9,"column":21,"offset":391},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":9,"column":21,"offset":391},"end":{"line":9,"column":34,"offset":404},"indent":[]}},{"type":"text","value":" 指定 ","position":{"start":{"line":9,"column":34,"offset":404},"end":{"line":9,"column":38,"offset":408},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">shape</code>","position":{"start":{"line":9,"column":38,"offset":408},"end":{"line":9,"column":45,"offset":415},"indent":[]}},{"type":"text","value":" 为 ","position":{"start":{"line":9,"column":45,"offset":415},"end":{"line":9,"column":48,"offset":418},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">&#39;circle&#39;</code>","position":{"start":{"line":9,"column":48,"offset":418},"end":{"line":9,"column":58,"offset":428},"indent":[]}},{"type":"text","value":"，即可使用 ","position":{"start":{"line":9,"column":58,"offset":428},"end":{"line":9,"column":64,"offset":434},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">circle</code>","position":{"start":{"line":9,"column":64,"offset":434},"end":{"line":9,"column":72,"offset":442},"indent":[]}},{"type":"text","value":" 节点。","position":{"start":{"line":9,"column":72,"offset":442},"end":{"line":9,"column":76,"offset":446},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":371},"end":{"line":9,"column":76,"offset":446},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> graph <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">G6<span class=\"token punctuation\">.</span>Graph</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n  container<span class=\"token punctuation\">:</span> <span class=\"token string\">'mountNode'</span><span class=\"token punctuation\">,</span>\n  width<span class=\"token punctuation\">:</span> <span class=\"token number\">800</span><span class=\"token punctuation\">,</span>\n  height<span class=\"token punctuation\">:</span> <span class=\"token number\">600</span><span class=\"token punctuation\">,</span>\n  defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    shape<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</span><span class=\"token punctuation\">,</span> <span class=\"token comment\">// 节点类型</span>\n    <span class=\"token comment\">// ... 其他配置</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":10,"column":1,"offset":447},"end":{"line":20,"column":4,"offset":617},"indent":[1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#2-在数据中动态配置","title":null,"children":[],"data":{"hProperties":{"aria-label":"2 在数据中动态配置 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"2 在数据中动态配置","position":{"start":{"line":23,"column":5,"offset":624},"end":{"line":23,"column":15,"offset":634},"indent":[]}}],"position":{"start":{"line":23,"column":1,"offset":620},"end":{"line":23,"column":15,"offset":634},"indent":[]},"data":{"id":"2-在数据中动态配置","htmlAttributes":{"id":"2-在数据中动态配置"},"hProperties":{"id":"2-在数据中动态配置"}}},{"type":"paragraph","children":[{"type":"text","value":"如果需要使不同节点有不同的配置，可以将配置写入到节点数据中。这种配置方式可以通过下面代码的形式直接写入数据，也可以通过遍历数据的方式写入。","position":{"start":{"line":24,"column":1,"offset":635},"end":{"line":24,"column":70,"offset":704},"indent":[]}}],"position":{"start":{"line":24,"column":1,"offset":635},"end":{"line":24,"column":70,"offset":704},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> data <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n  nodes<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span>\n  <span class=\"token punctuation\">{</span>\n\t  id<span class=\"token punctuation\">:</span> <span class=\"token string\">'node0'</span><span class=\"token punctuation\">,</span>\n    shape<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</span><span class=\"token punctuation\">,</span> <span class=\"token comment\">// 节点类型</span>\n    <span class=\"token operator\">...</span> <span class=\"token comment\">// 其他配置</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token operator\">...</span> <span class=\"token comment\">// 其他节点</span>\n  <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n  edges<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span>\n    <span class=\"token operator\">...</span> <span class=\"token comment\">// 边</span>\n  <span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>","position":{"start":{"line":25,"column":1,"offset":705},"end":{"line":39,"column":4,"offset":869},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#配置项说明","title":null,"children":[],"data":{"hProperties":{"aria-label":"配置项说明 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"配置项说明","position":{"start":{"line":42,"column":4,"offset":875},"end":{"line":42,"column":9,"offset":880},"indent":[]}}],"position":{"start":{"line":42,"column":1,"offset":872},"end":{"line":42,"column":9,"offset":880},"indent":[]},"data":{"id":"配置项说明","htmlAttributes":{"id":"配置项说明"},"hProperties":{"id":"配置项说明"}}},{"type":"paragraph","children":[{"type":"text","value":"circle 节点支持以下的配置项，对于 Object 类型的配置项将在后面有详细讲解：","position":{"start":{"line":43,"column":1,"offset":881},"end":{"line":43,"column":45,"offset":925},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":43,"column":45,"offset":925},"end":{"line":43,"column":51,"offset":931},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":881},"end":{"line":43,"column":51,"offset":931},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":45,"column":3,"offset":935},"end":{"line":45,"column":5,"offset":937},"indent":[]}}],"position":{"start":{"line":45,"column":3,"offset":935},"end":{"line":45,"column":5,"offset":937},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":45,"column":8,"offset":940},"end":{"line":45,"column":10,"offset":942},"indent":[]}}],"position":{"start":{"line":45,"column":8,"offset":940},"end":{"line":45,"column":10,"offset":942},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":45,"column":13,"offset":945},"end":{"line":45,"column":15,"offset":947},"indent":[]}}],"position":{"start":{"line":45,"column":13,"offset":945},"end":{"line":45,"column":15,"offset":947},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":45,"column":18,"offset":950},"end":{"line":45,"column":20,"offset":952},"indent":[]}}],"position":{"start":{"line":45,"column":18,"offset":950},"end":{"line":45,"column":20,"offset":952},"indent":[]}}],"position":{"start":{"line":45,"column":1,"offset":933},"end":{"line":45,"column":22,"offset":954},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"size","position":{"start":{"line":47,"column":3,"offset":983},"end":{"line":47,"column":7,"offset":987},"indent":[]}}],"position":{"start":{"line":47,"column":3,"offset":983},"end":{"line":47,"column":7,"offset":987},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"圆的直径","position":{"start":{"line":47,"column":10,"offset":990},"end":{"line":47,"column":14,"offset":994},"indent":[]}}],"position":{"start":{"line":47,"column":10,"offset":990},"end":{"line":47,"column":14,"offset":994},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":47,"column":17,"offset":997},"end":{"line":47,"column":23,"offset":1003},"indent":[]}}],"position":{"start":{"line":47,"column":17,"offset":997},"end":{"line":47,"column":23,"offset":1003},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Array","position":{"start":{"line":47,"column":26,"offset":1006},"end":{"line":47,"column":31,"offset":1011},"indent":[]}}],"position":{"start":{"line":47,"column":26,"offset":1006},"end":{"line":47,"column":31,"offset":1011},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"size为数组时，取第一个值","position":{"start":{"line":47,"column":34,"offset":1014},"end":{"line":47,"column":48,"offset":1028},"indent":[]}}],"position":{"start":{"line":47,"column":34,"offset":1014},"end":{"line":47,"column":48,"offset":1028},"indent":[]}}],"position":{"start":{"line":47,"column":1,"offset":981},"end":{"line":47,"column":50,"offset":1030},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"style","position":{"start":{"line":48,"column":3,"offset":1033},"end":{"line":48,"column":8,"offset":1038},"indent":[]}}],"position":{"start":{"line":48,"column":3,"offset":1033},"end":{"line":48,"column":8,"offset":1038},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"circle 默认样式","position":{"start":{"line":48,"column":11,"offset":1041},"end":{"line":48,"column":22,"offset":1052},"indent":[]}}],"position":{"start":{"line":48,"column":11,"offset":1041},"end":{"line":48,"column":22,"offset":1052},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":48,"column":25,"offset":1055},"end":{"line":48,"column":31,"offset":1061},"indent":[]}}],"position":{"start":{"line":48,"column":25,"offset":1055},"end":{"line":48,"column":31,"offset":1061},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Canvas支持的属性","position":{"start":{"line":48,"column":34,"offset":1064},"end":{"line":48,"column":45,"offset":1075},"indent":[]}}],"position":{"start":{"line":48,"column":34,"offset":1064},"end":{"line":48,"column":45,"offset":1075},"indent":[]}}],"position":{"start":{"line":48,"column":1,"offset":1031},"end":{"line":48,"column":47,"offset":1077},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"labelCfg","position":{"start":{"line":49,"column":3,"offset":1080},"end":{"line":49,"column":11,"offset":1088},"indent":[]}}],"position":{"start":{"line":49,"column":3,"offset":1080},"end":{"line":49,"column":11,"offset":1088},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"文件配置项","position":{"start":{"line":49,"column":14,"offset":1091},"end":{"line":49,"column":19,"offset":1096},"indent":[]}}],"position":{"start":{"line":49,"column":14,"offset":1091},"end":{"line":49,"column":19,"offset":1096},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":49,"column":22,"offset":1099},"end":{"line":49,"column":28,"offset":1105},"indent":[]}}],"position":{"start":{"line":49,"column":22,"offset":1099},"end":{"line":49,"column":28,"offset":1105},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":49,"column":32,"offset":1109},"end":{"line":49,"column":32,"offset":1109},"indent":[]}}],"position":{"start":{"line":49,"column":1,"offset":1078},"end":{"line":49,"column":33,"offset":1110},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"stateStyles","position":{"start":{"line":50,"column":3,"offset":1113},"end":{"line":50,"column":14,"offset":1124},"indent":[]}}],"position":{"start":{"line":50,"column":3,"offset":1113},"end":{"line":50,"column":14,"offset":1124},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"各状态下的样式","position":{"start":{"line":50,"column":17,"offset":1127},"end":{"line":50,"column":24,"offset":1134},"indent":[]}}],"position":{"start":{"line":50,"column":17,"offset":1127},"end":{"line":50,"column":24,"offset":1134},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":50,"column":27,"offset":1137},"end":{"line":50,"column":33,"offset":1143},"indent":[]}}],"position":{"start":{"line":50,"column":27,"offset":1137},"end":{"line":50,"column":33,"offset":1143},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"只对keyShape起作用","position":{"start":{"line":50,"column":36,"offset":1146},"end":{"line":50,"column":49,"offset":1159},"indent":[]}}],"position":{"start":{"line":50,"column":36,"offset":1146},"end":{"line":50,"column":49,"offset":1159},"indent":[]}}],"position":{"start":{"line":50,"column":1,"offset":1111},"end":{"line":50,"column":51,"offset":1161},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"linkPoints","position":{"start":{"line":51,"column":3,"offset":1164},"end":{"line":51,"column":13,"offset":1174},"indent":[]}}],"position":{"start":{"line":51,"column":3,"offset":1164},"end":{"line":51,"column":13,"offset":1174},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"相关边的连入点","position":{"start":{"line":51,"column":16,"offset":1177},"end":{"line":51,"column":23,"offset":1184},"indent":[]}}],"position":{"start":{"line":51,"column":16,"offset":1177},"end":{"line":51,"column":23,"offset":1184},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":51,"column":26,"offset":1187},"end":{"line":51,"column":32,"offset":1193},"indent":[]}}],"position":{"start":{"line":51,"column":26,"offset":1187},"end":{"line":51,"column":32,"offset":1193},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认不显示","position":{"start":{"line":51,"column":35,"offset":1196},"end":{"line":51,"column":40,"offset":1201},"indent":[]}}],"position":{"start":{"line":51,"column":35,"offset":1196},"end":{"line":51,"column":40,"offset":1201},"indent":[]}}],"position":{"start":{"line":51,"column":1,"offset":1162},"end":{"line":51,"column":42,"offset":1203},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"icon","position":{"start":{"line":52,"column":3,"offset":1206},"end":{"line":52,"column":7,"offset":1210},"indent":[]}}],"position":{"start":{"line":52,"column":3,"offset":1206},"end":{"line":52,"column":7,"offset":1210},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"圆上 icon 配置","position":{"start":{"line":52,"column":10,"offset":1213},"end":{"line":52,"column":20,"offset":1223},"indent":[]}}],"position":{"start":{"line":52,"column":10,"offset":1213},"end":{"line":52,"column":20,"offset":1223},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":52,"column":23,"offset":1226},"end":{"line":52,"column":29,"offset":1232},"indent":[]}}],"position":{"start":{"line":52,"column":23,"offset":1226},"end":{"line":52,"column":29,"offset":1232},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认不显示icon","position":{"start":{"line":52,"column":32,"offset":1235},"end":{"line":52,"column":41,"offset":1244},"indent":[]}}],"position":{"start":{"line":52,"column":32,"offset":1235},"end":{"line":52,"column":41,"offset":1244},"indent":[]}}],"position":{"start":{"line":52,"column":1,"offset":1204},"end":{"line":52,"column":43,"offset":1246},"indent":[]}}],"position":{"start":{"line":45,"column":1,"offset":933},"end":{"line":52,"column":43,"offset":1246},"indent":[1,1,1,1,1,1,1]}},{"type":"heading","depth":5,"children":[{"type":"link","url":"#样式属性-style","title":null,"children":[],"data":{"hProperties":{"aria-label":"样式属性 style permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"样式属性 style","position":{"start":{"line":56,"column":7,"offset":1256},"end":{"line":56,"column":17,"offset":1266},"indent":[]}}],"position":{"start":{"line":56,"column":1,"offset":1250},"end":{"line":56,"column":17,"offset":1266},"indent":[]},"data":{"id":"样式属性-style","htmlAttributes":{"id":"样式属性-style"},"hProperties":{"id":"样式属性-style"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过 ","position":{"start":{"line":57,"column":1,"offset":1267},"end":{"line":57,"column":14,"offset":1280},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">style</code>","position":{"start":{"line":57,"column":14,"offset":1280},"end":{"line":57,"column":21,"offset":1287},"indent":[]}},{"type":"text","value":" 配置来修改节点的填充色、描边等属性。下面代码演示在实例化图时全局配置方法中配置 ","position":{"start":{"line":57,"column":21,"offset":1287},"end":{"line":57,"column":62,"offset":1328},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">style</code>","position":{"start":{"line":57,"column":62,"offset":1328},"end":{"line":57,"column":69,"offset":1335},"indent":[]}},{"type":"text","value":"，使之达到如下图效果。","position":{"start":{"line":57,"column":69,"offset":1335},"end":{"line":57,"column":80,"offset":1346},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":57,"column":80,"offset":1346},"end":{"line":57,"column":86,"offset":1352},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570866569940-f5ac3899-f31a-4276-b470-a4583b198624.png#align=left&display=inline&height=60&name=image.png&originHeight=120&originWidth=124&search=&size=17308&status=done&width=62","alt":"image.png","position":{"start":{"line":57,"column":86,"offset":1352},"end":{"line":57,"column":324,"offset":1590},"indent":[]}}],"position":{"start":{"line":57,"column":1,"offset":1267},"end":{"line":57,"column":324,"offset":1590},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> data <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n  nodes<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span>\n    <span class=\"token punctuation\">{</span>\n      x<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span><span class=\"token punctuation\">,</span>\n      y<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span><span class=\"token punctuation\">,</span>\n      shape<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</span><span class=\"token punctuation\">,</span>\n      label<span class=\"token punctuation\">:</span> <span class=\"token string\">'circle'</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> graph <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">G6<span class=\"token punctuation\">.</span>Graph</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n  container<span class=\"token punctuation\">:</span> <span class=\"token string\">'mountNode'</span><span class=\"token punctuation\">,</span>\n  width<span class=\"token punctuation\">:</span> <span class=\"token number\">800</span><span class=\"token punctuation\">,</span>\n  height<span class=\"token punctuation\">:</span> <span class=\"token number\">600</span><span class=\"token punctuation\">,</span>\n  defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token comment\">// shape: 'circle',  // 在数据中已经指定 shape，这里无需再次指定</span>\n    style<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n      fill<span class=\"token punctuation\">:</span> <span class=\"token string\">'#bae637'</span><span class=\"token punctuation\">,</span>\n      stroke<span class=\"token punctuation\">:</span> <span class=\"token string\">'#eaff8f'</span><span class=\"token punctuation\">,</span>\n      lineWidth<span class=\"token punctuation\">:</span> <span class=\"token number\">5</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\ngraph<span class=\"token punctuation\">.</span><span class=\"token function\">data</span><span class=\"token punctuation\">(</span>data<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\ngraph<span class=\"token punctuation\">.</span><span class=\"token function\">render</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":58,"column":1,"offset":1591},"end":{"line":82,"column":4,"offset":1987},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":5,"children":[{"type":"link","url":"#标签文本配置-labelcfg","title":null,"children":[],"data":{"hProperties":{"aria-label":"标签文本配置 labelcfg permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"标签文本配置 labelCfg","position":{"start":{"line":85,"column":7,"offset":1996},"end":{"line":85,"column":22,"offset":2011},"indent":[]}}],"position":{"start":{"line":85,"column":1,"offset":1990},"end":{"line":85,"column":22,"offset":2011},"indent":[]},"data":{"id":"标签文本配置-labelcfg","htmlAttributes":{"id":"标签文本配置-labelcfg"},"hProperties":{"id":"标签文本配置-labelcfg"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过 ","position":{"start":{"line":86,"column":1,"offset":2012},"end":{"line":86,"column":14,"offset":2025},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">labelCfg</code>","position":{"start":{"line":86,"column":14,"offset":2025},"end":{"line":86,"column":24,"offset":2035},"indent":[]}},{"type":"text","value":" 配置标签文本。基于上面 ","position":{"start":{"line":86,"column":24,"offset":2035},"end":{"line":86,"column":37,"offset":2048},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":86,"column":38,"offset":2049},"end":{"line":86,"column":48,"offset":2059},"indent":[]}}],"position":{"start":{"line":86,"column":37,"offset":2048},"end":{"line":86,"column":62,"offset":2073},"indent":[]}},{"type":"text","value":" 中的代码，下面代码在 ","position":{"start":{"line":86,"column":62,"offset":2073},"end":{"line":86,"column":74,"offset":2085},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":86,"column":74,"offset":2085},"end":{"line":86,"column":87,"offset":2098},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":86,"column":87,"offset":2098},"end":{"line":86,"column":93,"offset":2104},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">labelCfg</code>","position":{"start":{"line":86,"column":93,"offset":2104},"end":{"line":86,"column":103,"offset":2114},"indent":[]}},{"type":"text","value":" 配置项进行文本的配置，使之达到如下图效果。","position":{"start":{"line":86,"column":103,"offset":2114},"end":{"line":86,"column":125,"offset":2136},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":86,"column":125,"offset":2136},"end":{"line":86,"column":131,"offset":2142},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570866613460-40d3d38a-15c5-4fb6-8413-b7235fd5c2f7.png#align=left&display=inline&height=80&name=image.png&originHeight=160&originWidth=124&search=&size=15339&status=done&width=62","alt":"image.png","position":{"start":{"line":86,"column":131,"offset":2142},"end":{"line":86,"column":369,"offset":2380},"indent":[]}}],"position":{"start":{"line":86,"column":1,"offset":2012},"end":{"line":86,"column":369,"offset":2380},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> data <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// ... data 内容</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> graph <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">G6<span class=\"token punctuation\">.</span>Graph</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// ... 图的其他属性</span>\n  defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token comment\">// ... 节点其他属性</span>\n    labelCfg<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n      position<span class=\"token punctuation\">:</span> <span class=\"token string\">'bottom'</span><span class=\"token punctuation\">,</span>\n      offset<span class=\"token punctuation\">:</span> <span class=\"token number\">10</span><span class=\"token punctuation\">,</span>\n      style<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n        <span class=\"token comment\">// ... 文本样式的配置</span>\n      <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token comment\">// ...</span>\n</code></pre></div>","position":{"start":{"line":87,"column":1,"offset":2381},"end":{"line":105,"column":4,"offset":2638},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":5,"children":[{"type":"link","url":"#边的连入点-linkpoints","title":null,"children":[],"data":{"hProperties":{"aria-label":"边的连入点 linkpoints permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"边的连入点 linkPoints","position":{"start":{"line":108,"column":7,"offset":2647},"end":{"line":108,"column":23,"offset":2663},"indent":[]}}],"position":{"start":{"line":108,"column":1,"offset":2641},"end":{"line":108,"column":23,"offset":2663},"indent":[]},"data":{"id":"边的连入点-linkpoints","htmlAttributes":{"id":"边的连入点-linkpoints"},"hProperties":{"id":"边的连入点-linkpoints"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过配置 ","position":{"start":{"line":109,"column":1,"offset":2664},"end":{"line":109,"column":16,"offset":2679},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">linkPoints</code>","position":{"start":{"line":109,"column":16,"offset":2679},"end":{"line":109,"column":28,"offset":2691},"indent":[]}},{"type":"text","value":" ，可以指定节点周围「上、下、左、右」四个方向上边的连入点。","position":{"start":{"line":109,"column":28,"offset":2691},"end":{"line":109,"column":58,"offset":2721},"indent":[]}}],"position":{"start":{"line":109,"column":1,"offset":2664},"end":{"line":109,"column":58,"offset":2721},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":111,"column":3,"offset":2725},"end":{"line":111,"column":5,"offset":2727},"indent":[]}}],"position":{"start":{"line":111,"column":3,"offset":2725},"end":{"line":111,"column":5,"offset":2727},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":111,"column":8,"offset":2730},"end":{"line":111,"column":10,"offset":2732},"indent":[]}}],"position":{"start":{"line":111,"column":8,"offset":2730},"end":{"line":111,"column":10,"offset":2732},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":111,"column":13,"offset":2735},"end":{"line":111,"column":15,"offset":2737},"indent":[]}}],"position":{"start":{"line":111,"column":13,"offset":2735},"end":{"line":111,"column":15,"offset":2737},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":111,"column":18,"offset":2740},"end":{"line":111,"column":20,"offset":2742},"indent":[]}}],"position":{"start":{"line":111,"column":18,"offset":2740},"end":{"line":111,"column":20,"offset":2742},"indent":[]}}],"position":{"start":{"line":111,"column":1,"offset":2723},"end":{"line":111,"column":22,"offset":2744},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"top","position":{"start":{"line":113,"column":3,"offset":2773},"end":{"line":113,"column":6,"offset":2776},"indent":[]}}],"position":{"start":{"line":113,"column":3,"offset":2773},"end":{"line":113,"column":6,"offset":2776},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示上部的连接点","position":{"start":{"line":113,"column":9,"offset":2779},"end":{"line":113,"column":19,"offset":2789},"indent":[]}}],"position":{"start":{"line":113,"column":9,"offset":2779},"end":{"line":113,"column":19,"offset":2789},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":113,"column":22,"offset":2792},"end":{"line":113,"column":29,"offset":2799},"indent":[]}}],"position":{"start":{"line":113,"column":22,"offset":2792},"end":{"line":113,"column":29,"offset":2799},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":113,"column":32,"offset":2802},"end":{"line":113,"column":40,"offset":2810},"indent":[]}}],"position":{"start":{"line":113,"column":32,"offset":2802},"end":{"line":113,"column":40,"offset":2810},"indent":[]}}],"position":{"start":{"line":113,"column":1,"offset":2771},"end":{"line":113,"column":42,"offset":2812},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"bottom","position":{"start":{"line":114,"column":3,"offset":2815},"end":{"line":114,"column":9,"offset":2821},"indent":[]}}],"position":{"start":{"line":114,"column":3,"offset":2815},"end":{"line":114,"column":9,"offset":2821},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示底部的连接点","position":{"start":{"line":114,"column":12,"offset":2824},"end":{"line":114,"column":22,"offset":2834},"indent":[]}}],"position":{"start":{"line":114,"column":12,"offset":2824},"end":{"line":114,"column":22,"offset":2834},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":114,"column":25,"offset":2837},"end":{"line":114,"column":32,"offset":2844},"indent":[]}}],"position":{"start":{"line":114,"column":25,"offset":2837},"end":{"line":114,"column":32,"offset":2844},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":114,"column":35,"offset":2847},"end":{"line":114,"column":43,"offset":2855},"indent":[]}}],"position":{"start":{"line":114,"column":35,"offset":2847},"end":{"line":114,"column":43,"offset":2855},"indent":[]}}],"position":{"start":{"line":114,"column":1,"offset":2813},"end":{"line":114,"column":45,"offset":2857},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"left","position":{"start":{"line":115,"column":3,"offset":2860},"end":{"line":115,"column":7,"offset":2864},"indent":[]}}],"position":{"start":{"line":115,"column":3,"offset":2860},"end":{"line":115,"column":7,"offset":2864},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示左侧的连接点","position":{"start":{"line":115,"column":10,"offset":2867},"end":{"line":115,"column":20,"offset":2877},"indent":[]}}],"position":{"start":{"line":115,"column":10,"offset":2867},"end":{"line":115,"column":20,"offset":2877},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":115,"column":23,"offset":2880},"end":{"line":115,"column":30,"offset":2887},"indent":[]}}],"position":{"start":{"line":115,"column":23,"offset":2880},"end":{"line":115,"column":30,"offset":2887},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":115,"column":33,"offset":2890},"end":{"line":115,"column":41,"offset":2898},"indent":[]}}],"position":{"start":{"line":115,"column":33,"offset":2890},"end":{"line":115,"column":41,"offset":2898},"indent":[]}}],"position":{"start":{"line":115,"column":1,"offset":2858},"end":{"line":115,"column":43,"offset":2900},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"right","position":{"start":{"line":116,"column":3,"offset":2903},"end":{"line":116,"column":8,"offset":2908},"indent":[]}}],"position":{"start":{"line":116,"column":3,"offset":2903},"end":{"line":116,"column":8,"offset":2908},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示右侧的连接点","position":{"start":{"line":116,"column":11,"offset":2911},"end":{"line":116,"column":21,"offset":2921},"indent":[]}}],"position":{"start":{"line":116,"column":11,"offset":2911},"end":{"line":116,"column":21,"offset":2921},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":116,"column":24,"offset":2924},"end":{"line":116,"column":31,"offset":2931},"indent":[]}}],"position":{"start":{"line":116,"column":24,"offset":2924},"end":{"line":116,"column":31,"offset":2931},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":116,"column":34,"offset":2934},"end":{"line":116,"column":42,"offset":2942},"indent":[]}}],"position":{"start":{"line":116,"column":34,"offset":2934},"end":{"line":116,"column":42,"offset":2942},"indent":[]}}],"position":{"start":{"line":116,"column":1,"offset":2901},"end":{"line":116,"column":44,"offset":2944},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"size","position":{"start":{"line":117,"column":3,"offset":2947},"end":{"line":117,"column":7,"offset":2951},"indent":[]}}],"position":{"start":{"line":117,"column":3,"offset":2947},"end":{"line":117,"column":7,"offset":2951},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的大小","position":{"start":{"line":117,"column":10,"offset":2954},"end":{"line":117,"column":16,"offset":2960},"indent":[]}}],"position":{"start":{"line":117,"column":10,"offset":2954},"end":{"line":117,"column":16,"offset":2960},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":117,"column":19,"offset":2963},"end":{"line":117,"column":25,"offset":2969},"indent":[]}}],"position":{"start":{"line":117,"column":19,"offset":2963},"end":{"line":117,"column":25,"offset":2969},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为3","position":{"start":{"line":117,"column":28,"offset":2972},"end":{"line":117,"column":32,"offset":2976},"indent":[]}}],"position":{"start":{"line":117,"column":28,"offset":2972},"end":{"line":117,"column":32,"offset":2976},"indent":[]}}],"position":{"start":{"line":117,"column":1,"offset":2945},"end":{"line":117,"column":34,"offset":2978},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"fill","position":{"start":{"line":118,"column":3,"offset":2981},"end":{"line":118,"column":7,"offset":2985},"indent":[]}}],"position":{"start":{"line":118,"column":3,"offset":2981},"end":{"line":118,"column":7,"offset":2985},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的填充色","position":{"start":{"line":118,"column":10,"offset":2988},"end":{"line":118,"column":17,"offset":2995},"indent":[]}}],"position":{"start":{"line":118,"column":10,"offset":2988},"end":{"line":118,"column":17,"offset":2995},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":118,"column":20,"offset":2998},"end":{"line":118,"column":26,"offset":3004},"indent":[]}}],"position":{"start":{"line":118,"column":20,"offset":2998},"end":{"line":118,"column":26,"offset":3004},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为#72CC4A","position":{"start":{"line":118,"column":29,"offset":3007},"end":{"line":118,"column":39,"offset":3017},"indent":[]}}],"position":{"start":{"line":118,"column":29,"offset":3007},"end":{"line":118,"column":39,"offset":3017},"indent":[]}}],"position":{"start":{"line":118,"column":1,"offset":2979},"end":{"line":118,"column":41,"offset":3019},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"stroke","position":{"start":{"line":119,"column":3,"offset":3022},"end":{"line":119,"column":9,"offset":3028},"indent":[]}}],"position":{"start":{"line":119,"column":3,"offset":3022},"end":{"line":119,"column":9,"offset":3028},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的描边颜色","position":{"start":{"line":119,"column":12,"offset":3031},"end":{"line":119,"column":20,"offset":3039},"indent":[]}}],"position":{"start":{"line":119,"column":12,"offset":3031},"end":{"line":119,"column":20,"offset":3039},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":119,"column":23,"offset":3042},"end":{"line":119,"column":29,"offset":3048},"indent":[]}}],"position":{"start":{"line":119,"column":23,"offset":3042},"end":{"line":119,"column":29,"offset":3048},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为#72CC4A","position":{"start":{"line":119,"column":32,"offset":3051},"end":{"line":119,"column":42,"offset":3061},"indent":[]}}],"position":{"start":{"line":119,"column":32,"offset":3051},"end":{"line":119,"column":42,"offset":3061},"indent":[]}}],"position":{"start":{"line":119,"column":1,"offset":3020},"end":{"line":119,"column":44,"offset":3063},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"lineWidth","position":{"start":{"line":120,"column":3,"offset":3066},"end":{"line":120,"column":12,"offset":3075},"indent":[]}}],"position":{"start":{"line":120,"column":3,"offset":3066},"end":{"line":120,"column":12,"offset":3075},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点描边的宽度","position":{"start":{"line":120,"column":15,"offset":3078},"end":{"line":120,"column":23,"offset":3086},"indent":[]}}],"position":{"start":{"line":120,"column":15,"offset":3078},"end":{"line":120,"column":23,"offset":3086},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":120,"column":26,"offset":3089},"end":{"line":120,"column":32,"offset":3095},"indent":[]}}],"position":{"start":{"line":120,"column":26,"offset":3089},"end":{"line":120,"column":32,"offset":3095},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为1","position":{"start":{"line":120,"column":35,"offset":3098},"end":{"line":120,"column":39,"offset":3102},"indent":[]}}],"position":{"start":{"line":120,"column":35,"offset":3098},"end":{"line":120,"column":39,"offset":3102},"indent":[]}}],"position":{"start":{"line":120,"column":1,"offset":3064},"end":{"line":120,"column":41,"offset":3104},"indent":[]}}],"position":{"start":{"line":111,"column":1,"offset":2723},"end":{"line":120,"column":41,"offset":3104},"indent":[1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"基于上面 ","position":{"start":{"line":123,"column":1,"offset":3107},"end":{"line":123,"column":6,"offset":3112},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":123,"column":7,"offset":3113},"end":{"line":123,"column":17,"offset":3123},"indent":[]}}],"position":{"start":{"line":123,"column":6,"offset":3112},"end":{"line":123,"column":31,"offset":3137},"indent":[]}},{"type":"text","value":" 中的代码，下面代码在 ","position":{"start":{"line":123,"column":31,"offset":3137},"end":{"line":123,"column":43,"offset":3149},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":123,"column":43,"offset":3149},"end":{"line":123,"column":56,"offset":3162},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":123,"column":56,"offset":3162},"end":{"line":123,"column":62,"offset":3168},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">linkPoints</code>","position":{"start":{"line":123,"column":62,"offset":3168},"end":{"line":123,"column":74,"offset":3180},"indent":[]}},{"type":"text","value":" 配置项进行连入点的配置，使之达到如下图效果。","position":{"start":{"line":123,"column":74,"offset":3180},"end":{"line":123,"column":97,"offset":3203},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":123,"column":97,"offset":3203},"end":{"line":123,"column":103,"offset":3209},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570866661011-e4310476-4a4f-4957-8a83-26e385793bf2.png#align=left&display=inline&height=79&name=image.png&originHeight=158&originWidth=136&search=&size=19560&status=done&width=68","alt":"image.png","position":{"start":{"line":123,"column":103,"offset":3209},"end":{"line":123,"column":341,"offset":3447},"indent":[]}}],"position":{"start":{"line":123,"column":1,"offset":3107},"end":{"line":123,"column":341,"offset":3447},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> data <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// ... data 内容</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> graph <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">G6<span class=\"token punctuation\">.</span>Graph</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// ... 图的其他属性</span>\n  defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token comment\">// ... 其他属性</span>\n    linkPoints<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n      top<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n      bottom<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n      left<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n      right<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n      fill<span class=\"token punctuation\">:</span> <span class=\"token string\">'#fff'</span><span class=\"token punctuation\">,</span>\n      size<span class=\"token punctuation\">:</span> <span class=\"token number\">5</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token comment\">// ...</span>\n</code></pre></div>","position":{"start":{"line":124,"column":1,"offset":3448},"end":{"line":143,"column":4,"offset":3724},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":5,"children":[{"type":"link","url":"#图标-icon","title":null,"children":[],"data":{"hProperties":{"aria-label":"图标 icon permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"图标 icon","position":{"start":{"line":146,"column":7,"offset":3733},"end":{"line":146,"column":14,"offset":3740},"indent":[]}}],"position":{"start":{"line":146,"column":1,"offset":3727},"end":{"line":146,"column":14,"offset":3740},"indent":[]},"data":{"id":"图标-icon","htmlAttributes":{"id":"图标-icon"},"hProperties":{"id":"图标-icon"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过配置 ","position":{"start":{"line":147,"column":1,"offset":3741},"end":{"line":147,"column":16,"offset":3756},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">icon</code>","position":{"start":{"line":147,"column":16,"offset":3756},"end":{"line":147,"column":22,"offset":3762},"indent":[]}},{"type":"text","value":"，可以在节点上显示小图标。","position":{"start":{"line":147,"column":22,"offset":3762},"end":{"line":147,"column":35,"offset":3775},"indent":[]}}],"position":{"start":{"line":147,"column":1,"offset":3741},"end":{"line":147,"column":35,"offset":3775},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":149,"column":3,"offset":3779},"end":{"line":149,"column":5,"offset":3781},"indent":[]}}],"position":{"start":{"line":149,"column":3,"offset":3779},"end":{"line":149,"column":5,"offset":3781},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":149,"column":8,"offset":3784},"end":{"line":149,"column":10,"offset":3786},"indent":[]}}],"position":{"start":{"line":149,"column":8,"offset":3784},"end":{"line":149,"column":10,"offset":3786},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":149,"column":13,"offset":3789},"end":{"line":149,"column":15,"offset":3791},"indent":[]}}],"position":{"start":{"line":149,"column":13,"offset":3789},"end":{"line":149,"column":15,"offset":3791},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":149,"column":18,"offset":3794},"end":{"line":149,"column":20,"offset":3796},"indent":[]}}],"position":{"start":{"line":149,"column":18,"offset":3794},"end":{"line":149,"column":20,"offset":3796},"indent":[]}}],"position":{"start":{"line":149,"column":1,"offset":3777},"end":{"line":149,"column":22,"offset":3798},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"show","position":{"start":{"line":151,"column":3,"offset":3827},"end":{"line":151,"column":7,"offset":3831},"indent":[]}}],"position":{"start":{"line":151,"column":3,"offset":3827},"end":{"line":151,"column":7,"offset":3831},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示icon","position":{"start":{"line":151,"column":10,"offset":3834},"end":{"line":151,"column":18,"offset":3842},"indent":[]}}],"position":{"start":{"line":151,"column":10,"offset":3834},"end":{"line":151,"column":18,"offset":3842},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":151,"column":21,"offset":3845},"end":{"line":151,"column":28,"offset":3852},"indent":[]}}],"position":{"start":{"line":151,"column":21,"offset":3845},"end":{"line":151,"column":28,"offset":3852},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false，不显示","position":{"start":{"line":151,"column":31,"offset":3855},"end":{"line":151,"column":43,"offset":3867},"indent":[]}}],"position":{"start":{"line":151,"column":31,"offset":3855},"end":{"line":151,"column":43,"offset":3867},"indent":[]}}],"position":{"start":{"line":151,"column":1,"offset":3825},"end":{"line":151,"column":45,"offset":3869},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"width","position":{"start":{"line":152,"column":3,"offset":3872},"end":{"line":152,"column":8,"offset":3877},"indent":[]}}],"position":{"start":{"line":152,"column":3,"offset":3872},"end":{"line":152,"column":8,"offset":3877},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"icon的宽度","position":{"start":{"line":152,"column":11,"offset":3880},"end":{"line":152,"column":18,"offset":3887},"indent":[]}}],"position":{"start":{"line":152,"column":11,"offset":3880},"end":{"line":152,"column":18,"offset":3887},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":152,"column":21,"offset":3890},"end":{"line":152,"column":27,"offset":3896},"indent":[]}}],"position":{"start":{"line":152,"column":21,"offset":3890},"end":{"line":152,"column":27,"offset":3896},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为16","position":{"start":{"line":152,"column":30,"offset":3899},"end":{"line":152,"column":35,"offset":3904},"indent":[]}}],"position":{"start":{"line":152,"column":30,"offset":3899},"end":{"line":152,"column":35,"offset":3904},"indent":[]}}],"position":{"start":{"line":152,"column":1,"offset":3870},"end":{"line":152,"column":37,"offset":3906},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"height","position":{"start":{"line":153,"column":3,"offset":3909},"end":{"line":153,"column":9,"offset":3915},"indent":[]}}],"position":{"start":{"line":153,"column":3,"offset":3909},"end":{"line":153,"column":9,"offset":3915},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"icon的高度","position":{"start":{"line":153,"column":12,"offset":3918},"end":{"line":153,"column":19,"offset":3925},"indent":[]}}],"position":{"start":{"line":153,"column":12,"offset":3918},"end":{"line":153,"column":19,"offset":3925},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":153,"column":22,"offset":3928},"end":{"line":153,"column":28,"offset":3934},"indent":[]}}],"position":{"start":{"line":153,"column":22,"offset":3928},"end":{"line":153,"column":28,"offset":3934},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为16","position":{"start":{"line":153,"column":31,"offset":3937},"end":{"line":153,"column":36,"offset":3942},"indent":[]}}],"position":{"start":{"line":153,"column":31,"offset":3937},"end":{"line":153,"column":36,"offset":3942},"indent":[]}}],"position":{"start":{"line":153,"column":1,"offset":3907},"end":{"line":153,"column":38,"offset":3944},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"img","position":{"start":{"line":154,"column":3,"offset":3947},"end":{"line":154,"column":6,"offset":3950},"indent":[]}}],"position":{"start":{"line":154,"column":3,"offset":3947},"end":{"line":154,"column":6,"offset":3950},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"icon的地址","position":{"start":{"line":154,"column":9,"offset":3953},"end":{"line":154,"column":16,"offset":3960},"indent":[]}}],"position":{"start":{"line":154,"column":9,"offset":3953},"end":{"line":154,"column":16,"offset":3960},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":154,"column":19,"offset":3963},"end":{"line":154,"column":25,"offset":3969},"indent":[]}}],"position":{"start":{"line":154,"column":19,"offset":3963},"end":{"line":154,"column":25,"offset":3969},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":154,"column":29,"offset":3973},"end":{"line":154,"column":29,"offset":3973},"indent":[]}}],"position":{"start":{"line":154,"column":1,"offset":3945},"end":{"line":154,"column":30,"offset":3974},"indent":[]}}],"position":{"start":{"line":149,"column":1,"offset":3777},"end":{"line":154,"column":30,"offset":3974},"indent":[1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"基于上面 ","position":{"start":{"line":157,"column":1,"offset":3977},"end":{"line":157,"column":6,"offset":3982},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":157,"column":7,"offset":3983},"end":{"line":157,"column":17,"offset":3993},"indent":[]}}],"position":{"start":{"line":157,"column":6,"offset":3982},"end":{"line":157,"column":31,"offset":4007},"indent":[]}},{"type":"text","value":" 中的代码，下面代码在 ","position":{"start":{"line":157,"column":31,"offset":4007},"end":{"line":157,"column":43,"offset":4019},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":157,"column":43,"offset":4019},"end":{"line":157,"column":56,"offset":4032},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":157,"column":56,"offset":4032},"end":{"line":157,"column":62,"offset":4038},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">icon</code>","position":{"start":{"line":157,"column":62,"offset":4038},"end":{"line":157,"column":68,"offset":4044},"indent":[]}},{"type":"text","value":" 配置项进行图标的配置，使之达到如下图效果。","position":{"start":{"line":157,"column":68,"offset":4044},"end":{"line":157,"column":90,"offset":4066},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":157,"column":90,"offset":4066},"end":{"line":157,"column":96,"offset":4072},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570866789558-2ac195ce-6ad6-44c2-9b97-fcc13650484d.png#align=left&display=inline&height=81&name=image.png&originHeight=162&originWidth=130&search=&size=24956&status=done&width=65","alt":"image.png","position":{"start":{"line":157,"column":96,"offset":4072},"end":{"line":157,"column":334,"offset":4310},"indent":[]}}],"position":{"start":{"line":157,"column":1,"offset":3977},"end":{"line":157,"column":334,"offset":4310},"indent":[]}},{"type":"html","lang":"javascript","meta":null,"value":"<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"language-javascript\"><code class=\"language-javascript\"><span class=\"token keyword\">const</span> data <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// ... data 内容</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> graph <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">G6<span class=\"token punctuation\">.</span>Graph</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// ... 图的其他属性</span>\n  defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token comment\">// ... 其他属性</span>\n    icon<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n      show<span class=\"token punctuation\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n      <span class=\"token comment\">//img: '...', 可更换为其他图片地址</span>\n      width<span class=\"token punctuation\">:</span> <span class=\"token number\">25</span><span class=\"token punctuation\">,</span>\n      height<span class=\"token punctuation\">:</span> <span class=\"token number\">25</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token comment\">// ...</span>\n</code></pre></div>","position":{"start":{"line":158,"column":1,"offset":4311},"end":{"line":175,"column":4,"offset":4555},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":176,"column":1,"offset":4556}}}}