@antv/g6
Version:
graph visualization frame work
1 lines • 81.8 kB
JSON
{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-ast-de7955532e62a50e0d3cb7446a7c4e84-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"heading","depth":2,"children":[{"type":"link","url":"#triangle","title":null,"children":[],"data":{"hProperties":{"aria-label":"triangle 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":"Triangle","position":{"start":{"line":1,"column":4,"offset":3},"end":{"line":1,"column":12,"offset":11},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":1,"column":12,"offset":11},"indent":[]},"data":{"id":"triangle","htmlAttributes":{"id":"triangle"},"hProperties":{"id":"triangle"}}},{"type":"paragraph","children":[{"type":"text","value":"G6 内置了三角形 Triangle 节点,其默认样式如下。标签文本位于三角形下方。","position":{"start":{"line":3,"column":1,"offset":13},"end":{"line":3,"column":43,"offset":55},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":3,"column":43,"offset":55},"end":{"line":3,"column":49,"offset":61},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570870797997-53bb1afa-6120-408f-90de-4fa89411eb75.png#align=left&display=inline&height=85&name=image.png&originHeight=170&originWidth=144&search=&size=11764&status=done&width=72","alt":"image.png","position":{"start":{"line":3,"column":49,"offset":61},"end":{"line":3,"column":287,"offset":299},"indent":[]}}],"position":{"start":{"line":3,"column":1,"offset":13},"end":{"line":3,"column":287,"offset":299},"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":6,"column":4,"offset":305},"end":{"line":6,"column":8,"offset":309},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":302},"end":{"line":6,"column":8,"offset":309},"indent":[]},"data":{"id":"使用方法","htmlAttributes":{"id":"使用方法"},"hProperties":{"id":"使用方法"}}},{"type":"paragraph","children":[{"type":"text","value":"如 ","position":{"start":{"line":7,"column":1,"offset":310},"end":{"line":7,"column":3,"offset":312},"indent":[]}},{"type":"link","title":null,"url":"../defaultNode","children":[{"type":"text","value":"内置节点","position":{"start":{"line":7,"column":4,"offset":313},"end":{"line":7,"column":8,"offset":317},"indent":[]}}],"position":{"start":{"line":7,"column":3,"offset":312},"end":{"line":7,"column":25,"offset":334},"indent":[]}},{"type":"text","value":" 一节所示,配置节点的方式有两种:实例化图时全局配置,在数据中动态配置。","position":{"start":{"line":7,"column":25,"offset":334},"end":{"line":7,"column":61,"offset":370},"indent":[]}}],"position":{"start":{"line":7,"column":1,"offset":310},"end":{"line":7,"column":61,"offset":370},"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":10,"column":5,"offset":377},"end":{"line":10,"column":16,"offset":388},"indent":[]}}],"position":{"start":{"line":10,"column":1,"offset":373},"end":{"line":10,"column":16,"offset":388},"indent":[]},"data":{"id":"1-实例化图时全局配置","htmlAttributes":{"id":"1-实例化图时全局配置"},"hProperties":{"id":"1-实例化图时全局配置"}}},{"type":"paragraph","children":[{"type":"text","value":"用户在实例化 Graph 时候可以通过 ","position":{"start":{"line":11,"column":1,"offset":389},"end":{"line":11,"column":21,"offset":409},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":11,"column":21,"offset":409},"end":{"line":11,"column":34,"offset":422},"indent":[]}},{"type":"text","value":" 指定 ","position":{"start":{"line":11,"column":34,"offset":422},"end":{"line":11,"column":38,"offset":426},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">shape</code>","position":{"start":{"line":11,"column":38,"offset":426},"end":{"line":11,"column":45,"offset":433},"indent":[]}},{"type":"text","value":" 为 ","position":{"start":{"line":11,"column":45,"offset":433},"end":{"line":11,"column":48,"offset":436},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'triangle'</code>","position":{"start":{"line":11,"column":48,"offset":436},"end":{"line":11,"column":60,"offset":448},"indent":[]}},{"type":"text","value":",即可使用 ","position":{"start":{"line":11,"column":60,"offset":448},"end":{"line":11,"column":66,"offset":454},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">triangle</code>","position":{"start":{"line":11,"column":66,"offset":454},"end":{"line":11,"column":76,"offset":464},"indent":[]}},{"type":"text","value":" 节点。","position":{"start":{"line":11,"column":76,"offset":464},"end":{"line":11,"column":80,"offset":468},"indent":[]}}],"position":{"start":{"line":11,"column":1,"offset":389},"end":{"line":11,"column":80,"offset":468},"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\">'triangle'</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><span class=\"token punctuation\">;</span>\n</code></pre></div>","position":{"start":{"line":12,"column":1,"offset":469},"end":{"line":22,"column":4,"offset":629},"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":25,"column":5,"offset":636},"end":{"line":25,"column":15,"offset":646},"indent":[]}}],"position":{"start":{"line":25,"column":1,"offset":632},"end":{"line":25,"column":15,"offset":646},"indent":[]},"data":{"id":"2-在数据中动态配置","htmlAttributes":{"id":"2-在数据中动态配置"},"hProperties":{"id":"2-在数据中动态配置"}}},{"type":"paragraph","children":[{"type":"text","value":"如果需要使不同节点有不同的配置,可以将配置写入到节点数据中。这种配置方式可以通过下面代码的形式直接写入数据,也可以通过遍历数据的方式写入。","position":{"start":{"line":26,"column":1,"offset":647},"end":{"line":26,"column":70,"offset":716},"indent":[]}}],"position":{"start":{"line":26,"column":1,"offset":647},"end":{"line":26,"column":70,"offset":716},"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><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\">'triangle'</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 <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":27,"column":1,"offset":717},"end":{"line":40,"column":4,"offset":874},"indent":[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":43,"column":4,"offset":880},"end":{"line":43,"column":9,"offset":885},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":877},"end":{"line":43,"column":9,"offset":885},"indent":[]},"data":{"id":"配置项说明","htmlAttributes":{"id":"配置项说明"},"hProperties":{"id":"配置项说明"}}},{"type":"paragraph","children":[{"type":"text","value":"triangle 节点支持以下的配置项:","position":{"start":{"line":44,"column":1,"offset":886},"end":{"line":44,"column":21,"offset":906},"indent":[]}}],"position":{"start":{"line":44,"column":1,"offset":886},"end":{"line":44,"column":21,"offset":906},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":46,"column":3,"offset":910},"end":{"line":46,"column":5,"offset":912},"indent":[]}}],"position":{"start":{"line":46,"column":3,"offset":910},"end":{"line":46,"column":5,"offset":912},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":46,"column":8,"offset":915},"end":{"line":46,"column":10,"offset":917},"indent":[]}}],"position":{"start":{"line":46,"column":8,"offset":915},"end":{"line":46,"column":10,"offset":917},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":46,"column":13,"offset":920},"end":{"line":46,"column":15,"offset":922},"indent":[]}}],"position":{"start":{"line":46,"column":13,"offset":920},"end":{"line":46,"column":15,"offset":922},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":46,"column":18,"offset":925},"end":{"line":46,"column":20,"offset":927},"indent":[]}}],"position":{"start":{"line":46,"column":18,"offset":925},"end":{"line":46,"column":20,"offset":927},"indent":[]}}],"position":{"start":{"line":46,"column":1,"offset":908},"end":{"line":46,"column":22,"offset":929},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"size","position":{"start":{"line":48,"column":3,"offset":958},"end":{"line":48,"column":7,"offset":962},"indent":[]}}],"position":{"start":{"line":48,"column":3,"offset":958},"end":{"line":48,"column":7,"offset":962},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"三角形的边长","position":{"start":{"line":48,"column":10,"offset":965},"end":{"line":48,"column":16,"offset":971},"indent":[]}}],"position":{"start":{"line":48,"column":10,"offset":965},"end":{"line":48,"column":16,"offset":971},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":48,"column":19,"offset":974},"end":{"line":48,"column":25,"offset":980},"indent":[]}}],"position":{"start":{"line":48,"column":19,"offset":974},"end":{"line":48,"column":25,"offset":980},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Array","position":{"start":{"line":48,"column":28,"offset":983},"end":{"line":48,"column":33,"offset":988},"indent":[]}}],"position":{"start":{"line":48,"column":28,"offset":983},"end":{"line":48,"column":33,"offset":988},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"size为数组时取第一个值","position":{"start":{"line":48,"column":36,"offset":991},"end":{"line":48,"column":49,"offset":1004},"indent":[]}}],"position":{"start":{"line":48,"column":36,"offset":991},"end":{"line":48,"column":49,"offset":1004},"indent":[]}}],"position":{"start":{"line":48,"column":1,"offset":956},"end":{"line":48,"column":51,"offset":1006},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"direction","position":{"start":{"line":49,"column":5,"offset":1011},"end":{"line":49,"column":14,"offset":1020},"indent":[]}}],"position":{"start":{"line":49,"column":3,"offset":1009},"end":{"line":49,"column":16,"offset":1022},"indent":[]}}],"position":{"start":{"line":49,"column":3,"offset":1009},"end":{"line":49,"column":16,"offset":1022},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"三角形的方向","position":{"start":{"line":49,"column":21,"offset":1027},"end":{"line":49,"column":27,"offset":1033},"indent":[]}}],"position":{"start":{"line":49,"column":19,"offset":1025},"end":{"line":49,"column":29,"offset":1035},"indent":[]}}],"position":{"start":{"line":49,"column":19,"offset":1025},"end":{"line":49,"column":29,"offset":1035},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"String","position":{"start":{"line":49,"column":34,"offset":1040},"end":{"line":49,"column":40,"offset":1046},"indent":[]}}],"position":{"start":{"line":49,"column":32,"offset":1038},"end":{"line":49,"column":42,"offset":1048},"indent":[]}}],"position":{"start":{"line":49,"column":32,"offset":1038},"end":{"line":49,"column":42,"offset":1048},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"可取值:up、down、left、right,默认为up。","position":{"start":{"line":49,"column":47,"offset":1053},"end":{"line":49,"column":76,"offset":1082},"indent":[]}}],"position":{"start":{"line":49,"column":45,"offset":1051},"end":{"line":49,"column":78,"offset":1084},"indent":[]}}],"position":{"start":{"line":49,"column":45,"offset":1051},"end":{"line":49,"column":78,"offset":1084},"indent":[]}}],"position":{"start":{"line":49,"column":1,"offset":1007},"end":{"line":49,"column":80,"offset":1086},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"style","position":{"start":{"line":50,"column":3,"offset":1089},"end":{"line":50,"column":8,"offset":1094},"indent":[]}}],"position":{"start":{"line":50,"column":3,"offset":1089},"end":{"line":50,"column":8,"offset":1094},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"三角形默认样式","position":{"start":{"line":50,"column":11,"offset":1097},"end":{"line":50,"column":18,"offset":1104},"indent":[]}}],"position":{"start":{"line":50,"column":11,"offset":1097},"end":{"line":50,"column":18,"offset":1104},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":50,"column":21,"offset":1107},"end":{"line":50,"column":27,"offset":1113},"indent":[]}}],"position":{"start":{"line":50,"column":21,"offset":1107},"end":{"line":50,"column":27,"offset":1113},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Canvas支持的属性","position":{"start":{"line":50,"column":30,"offset":1116},"end":{"line":50,"column":41,"offset":1127},"indent":[]}}],"position":{"start":{"line":50,"column":30,"offset":1116},"end":{"line":50,"column":41,"offset":1127},"indent":[]}}],"position":{"start":{"line":50,"column":1,"offset":1087},"end":{"line":50,"column":43,"offset":1129},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"labelCfg","position":{"start":{"line":51,"column":3,"offset":1132},"end":{"line":51,"column":11,"offset":1140},"indent":[]}}],"position":{"start":{"line":51,"column":3,"offset":1132},"end":{"line":51,"column":11,"offset":1140},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"文件配置项","position":{"start":{"line":51,"column":14,"offset":1143},"end":{"line":51,"column":19,"offset":1148},"indent":[]}}],"position":{"start":{"line":51,"column":14,"offset":1143},"end":{"line":51,"column":19,"offset":1148},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":51,"column":22,"offset":1151},"end":{"line":51,"column":28,"offset":1157},"indent":[]}}],"position":{"start":{"line":51,"column":22,"offset":1151},"end":{"line":51,"column":28,"offset":1157},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":51,"column":32,"offset":1161},"end":{"line":51,"column":32,"offset":1161},"indent":[]}}],"position":{"start":{"line":51,"column":1,"offset":1130},"end":{"line":51,"column":33,"offset":1162},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"stateStyles","position":{"start":{"line":52,"column":3,"offset":1165},"end":{"line":52,"column":14,"offset":1176},"indent":[]}}],"position":{"start":{"line":52,"column":3,"offset":1165},"end":{"line":52,"column":14,"offset":1176},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"各状态下的样式","position":{"start":{"line":52,"column":17,"offset":1179},"end":{"line":52,"column":24,"offset":1186},"indent":[]}}],"position":{"start":{"line":52,"column":17,"offset":1179},"end":{"line":52,"column":24,"offset":1186},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":52,"column":27,"offset":1189},"end":{"line":52,"column":33,"offset":1195},"indent":[]}}],"position":{"start":{"line":52,"column":27,"offset":1189},"end":{"line":52,"column":33,"offset":1195},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"只对keyShape起作用","position":{"start":{"line":52,"column":36,"offset":1198},"end":{"line":52,"column":49,"offset":1211},"indent":[]}}],"position":{"start":{"line":52,"column":36,"offset":1198},"end":{"line":52,"column":49,"offset":1211},"indent":[]}}],"position":{"start":{"line":52,"column":1,"offset":1163},"end":{"line":52,"column":51,"offset":1213},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"linkPoints","position":{"start":{"line":53,"column":3,"offset":1216},"end":{"line":53,"column":13,"offset":1226},"indent":[]}}],"position":{"start":{"line":53,"column":3,"offset":1216},"end":{"line":53,"column":13,"offset":1226},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"三角形上的链接点","position":{"start":{"line":53,"column":16,"offset":1229},"end":{"line":53,"column":24,"offset":1237},"indent":[]}}],"position":{"start":{"line":53,"column":16,"offset":1229},"end":{"line":53,"column":24,"offset":1237},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":53,"column":27,"offset":1240},"end":{"line":53,"column":33,"offset":1246},"indent":[]}}],"position":{"start":{"line":53,"column":27,"offset":1240},"end":{"line":53,"column":33,"offset":1246},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认不显示","position":{"start":{"line":53,"column":36,"offset":1249},"end":{"line":53,"column":41,"offset":1254},"indent":[]}}],"position":{"start":{"line":53,"column":36,"offset":1249},"end":{"line":53,"column":41,"offset":1254},"indent":[]}}],"position":{"start":{"line":53,"column":1,"offset":1214},"end":{"line":53,"column":43,"offset":1256},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"icon","position":{"start":{"line":54,"column":3,"offset":1259},"end":{"line":54,"column":7,"offset":1263},"indent":[]}}],"position":{"start":{"line":54,"column":3,"offset":1259},"end":{"line":54,"column":7,"offset":1263},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"三角形上icon配置","position":{"start":{"line":54,"column":10,"offset":1266},"end":{"line":54,"column":20,"offset":1276},"indent":[]}}],"position":{"start":{"line":54,"column":10,"offset":1266},"end":{"line":54,"column":20,"offset":1276},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":54,"column":23,"offset":1279},"end":{"line":54,"column":29,"offset":1285},"indent":[]}}],"position":{"start":{"line":54,"column":23,"offset":1279},"end":{"line":54,"column":29,"offset":1285},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认不显示icon","position":{"start":{"line":54,"column":32,"offset":1288},"end":{"line":54,"column":41,"offset":1297},"indent":[]}}],"position":{"start":{"line":54,"column":32,"offset":1288},"end":{"line":54,"column":41,"offset":1297},"indent":[]}}],"position":{"start":{"line":54,"column":1,"offset":1257},"end":{"line":54,"column":43,"offset":1299},"indent":[]}}],"position":{"start":{"line":46,"column":1,"offset":908},"end":{"line":54,"column":43,"offset":1299},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"link","url":"#三角形方向-direction","title":null,"children":[],"data":{"hProperties":{"aria-label":"三角形方向 direction 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":"三角形方向 direction","position":{"start":{"line":58,"column":5,"offset":1307},"end":{"line":58,"column":20,"offset":1322},"indent":[]}}],"position":{"start":{"line":58,"column":1,"offset":1303},"end":{"line":58,"column":20,"offset":1322},"indent":[]},"data":{"id":"三角形方向-direction","htmlAttributes":{"id":"三角形方向-direction"},"hProperties":{"id":"三角形方向-direction"}}},{"type":"paragraph","children":[{"type":"text","value":"String 类型。可取值有:","position":{"start":{"line":59,"column":1,"offset":1323},"end":{"line":59,"column":16,"offset":1338},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'``up'</code>","position":{"start":{"line":59,"column":16,"offset":1338},"end":{"line":59,"column":24,"offset":1346},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":59,"column":24,"offset":1346},"end":{"line":59,"column":25,"offset":1347},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'down'</code>","position":{"start":{"line":59,"column":25,"offset":1347},"end":{"line":59,"column":33,"offset":1355},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":59,"column":33,"offset":1355},"end":{"line":59,"column":34,"offset":1356},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'left'</code>","position":{"start":{"line":59,"column":34,"offset":1356},"end":{"line":59,"column":42,"offset":1364},"indent":[]}},{"type":"text","value":"、","position":{"start":{"line":59,"column":42,"offset":1364},"end":{"line":59,"column":43,"offset":1365},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'right'</code>","position":{"start":{"line":59,"column":43,"offset":1365},"end":{"line":59,"column":52,"offset":1374},"indent":[]}},{"type":"text","value":"。默认为 ","position":{"start":{"line":59,"column":52,"offset":1374},"end":{"line":59,"column":57,"offset":1379},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'``up'</code>","position":{"start":{"line":59,"column":57,"offset":1379},"end":{"line":59,"column":65,"offset":1387},"indent":[]}},{"type":"text","value":"。通过设置 ","position":{"start":{"line":59,"column":65,"offset":1387},"end":{"line":59,"column":71,"offset":1393},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">direction</code>","position":{"start":{"line":59,"column":71,"offset":1393},"end":{"line":59,"column":82,"offset":1404},"indent":[]}},{"type":"text","value":",可以修改三角形的方向。下面代码演示在实例化图时全局配置方法中配置 ","position":{"start":{"line":59,"column":82,"offset":1404},"end":{"line":59,"column":116,"offset":1438},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">direction</code>","position":{"start":{"line":59,"column":116,"offset":1438},"end":{"line":59,"column":127,"offset":1449},"indent":[]}},{"type":"text","value":"。","position":{"start":{"line":59,"column":127,"offset":1449},"end":{"line":59,"column":128,"offset":1450},"indent":[]}}],"position":{"start":{"line":59,"column":1,"offset":1323},"end":{"line":59,"column":128,"offset":1450},"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\">'triangle'</span><span class=\"token punctuation\">,</span>\n direction<span class=\"token punctuation\">:</span> <span class=\"token string\">'down'</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</code></pre></div>","position":{"start":{"line":60,"column":1,"offset":1451},"end":{"line":70,"column":4,"offset":1621},"indent":[1,1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570870797997-53bb1afa-6120-408f-90de-4fa89411eb75.png#align=left&display=inline&height=85&name=image.png&originHeight=170&originWidth=144&search=&size=11764&status=done&width=72","alt":"image.png","position":{"start":{"line":71,"column":1,"offset":1622},"end":{"line":71,"column":239,"offset":1860},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570870934266-10d81c4c-07d1-4ddc-ac79-a9f75b6361fa.png#align=left&display=inline&height=85&name=image.png&originHeight=170&originWidth=158&search=&size=12939&status=done&width=79","alt":"image.png","position":{"start":{"line":71,"column":239,"offset":1860},"end":{"line":71,"column":477,"offset":2098},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570870968309-bc30a7eb-6654-4f63-bdb5-5be1c2b35f50.png#align=left&display=inline&height=79&name=image.png&originHeight=158&originWidth=150&search=&size=12127&status=done&width=75","alt":"image.png","position":{"start":{"line":71,"column":477,"offset":2098},"end":{"line":71,"column":715,"offset":2336},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570870977602-fad049ab-5a92-4958-8713-277a574acc92.png#align=left&display=inline&height=77&name=image.png&originHeight=154&originWidth=140&search=&size=11137&status=done&width=70","alt":"image.png","position":{"start":{"line":71,"column":715,"offset":2336},"end":{"line":71,"column":953,"offset":2574},"indent":[]}}],"position":{"start":{"line":71,"column":1,"offset":1622},"end":{"line":71,"column":953,"offset":2574},"indent":[]}},{"type":"blockquote","children":[{"type":"paragraph","children":[{"type":"text","value":"上图分别是将 ","position":{"start":{"line":72,"column":3,"offset":2577},"end":{"line":72,"column":10,"offset":2584},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">direction</code>","position":{"start":{"line":72,"column":10,"offset":2584},"end":{"line":72,"column":21,"offset":2595},"indent":[]}},{"type":"text","value":" 配置为 ","position":{"start":{"line":72,"column":21,"offset":2595},"end":{"line":72,"column":26,"offset":2600},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'up'</code>","position":{"start":{"line":72,"column":26,"offset":2600},"end":{"line":72,"column":32,"offset":2606},"indent":[]}},{"type":"text","value":",","position":{"start":{"line":72,"column":32,"offset":2606},"end":{"line":72,"column":33,"offset":2607},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'down'</code>","position":{"start":{"line":72,"column":33,"offset":2607},"end":{"line":72,"column":41,"offset":2615},"indent":[]}},{"type":"text","value":",","position":{"start":{"line":72,"column":41,"offset":2615},"end":{"line":72,"column":42,"offset":2616},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'left'</code>","position":{"start":{"line":72,"column":42,"offset":2616},"end":{"line":72,"column":50,"offset":2624},"indent":[]}},{"type":"text","value":",","position":{"start":{"line":72,"column":50,"offset":2624},"end":{"line":72,"column":51,"offset":2625},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'right'</code>","position":{"start":{"line":72,"column":51,"offset":2625},"end":{"line":72,"column":60,"offset":2634},"indent":[]}},{"type":"text","value":" 的结果","position":{"start":{"line":72,"column":60,"offset":2634},"end":{"line":72,"column":64,"offset":2638},"indent":[]}}],"position":{"start":{"line":72,"column":3,"offset":2577},"end":{"line":72,"column":64,"offset":2638},"indent":[]}}],"position":{"start":{"line":72,"column":1,"offset":2575},"end":{"line":72,"column":64,"offset":2638},"indent":[]}},{"type":"heading","depth":3,"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":76,"column":5,"offset":2646},"end":{"line":76,"column":15,"offset":2656},"indent":[]}}],"position":{"start":{"line":76,"column":1,"offset":2642},"end":{"line":76,"column":15,"offset":2656},"indent":[]},"data":{"id":"样式属性-style","htmlAttributes":{"id":"样式属性-style"},"hProperties":{"id":"样式属性-style"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过 ","position":{"start":{"line":77,"column":1,"offset":2657},"end":{"line":77,"column":14,"offset":2670},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">style</code>","position":{"start":{"line":77,"column":14,"offset":2670},"end":{"line":77,"column":21,"offset":2677},"indent":[]}},{"type":"text","value":" 配置来修改节点的填充色、描边等属性。下面代码演示在实例化图时全局配置方法中配置 ","position":{"start":{"line":77,"column":21,"offset":2677},"end":{"line":77,"column":62,"offset":2718},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">style</code>","position":{"start":{"line":77,"column":62,"offset":2718},"end":{"line":77,"column":69,"offset":2725},"indent":[]}},{"type":"text","value":",使之达到如下图效果。","position":{"start":{"line":77,"column":69,"offset":2725},"end":{"line":77,"column":80,"offset":2736},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":77,"column":80,"offset":2736},"end":{"line":77,"column":86,"offset":2742},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570871036215-2d94e3ef-f9d9-42c0-8073-5b95789903ad.png#align=left&display=inline&height=83&name=image.png&originHeight=166&originWidth=138&search=&size=16513&status=done&width=69","alt":"image.png","position":{"start":{"line":77,"column":86,"offset":2742},"end":{"line":77,"column":324,"offset":2980},"indent":[]}}],"position":{"start":{"line":77,"column":1,"offset":2657},"end":{"line":77,"column":324,"offset":2980},"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\">'triangle'</span><span class=\"token punctuation\">,</span>\n label<span class=\"token punctuation\">:</span> <span class=\"token string\">'triangle'</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: 'triangle',// 在数据中已经指定 shape,这里无需再次指定</span>\n direction<span class=\"token punctuation\">:</span> <span class=\"token string\">'up'</span><span class=\"token punctuation\">,</span>\n size<span class=\"token punctuation\">:</span> <span class=\"token number\">100</span><span class=\"token punctuation\">,</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":78,"column":1,"offset":2981},"end":{"line":104,"column":4,"offset":3418},"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,1,1]}},{"type":"heading","depth":3,"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":107,"column":5,"offset":3425},"end":{"line":107,"column":20,"offset":3440},"indent":[]}}],"position":{"start":{"line":107,"column":1,"offset":3421},"end":{"line":107,"column":20,"offset":3440},"indent":[]},"data":{"id":"标签文本配置-labelcfg","htmlAttributes":{"id":"标签文本配置-labelcfg"},"hProperties":{"id":"标签文本配置-labelcfg"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过 ","position":{"start":{"line":108,"column":1,"offset":3441},"end":{"line":108,"column":14,"offset":3454},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">labelCfg</code>","position":{"start":{"line":108,"column":14,"offset":3454},"end":{"line":108,"column":24,"offset":3464},"indent":[]}},{"type":"text","value":" 配置标签文本。基于上面 ","position":{"start":{"line":108,"column":24,"offset":3464},"end":{"line":108,"column":37,"offset":3477},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":108,"column":38,"offset":3478},"end":{"line":108,"column":48,"offset":3488},"indent":[]}}],"position":{"start":{"line":108,"column":37,"offset":3477},"end":{"line":108,"column":62,"offset":3502},"indent":[]}},{"type":"text","value":" 中的代码,下面代码在 ","position":{"start":{"line":108,"column":62,"offset":3502},"end":{"line":108,"column":74,"offset":3514},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":108,"column":74,"offset":3514},"end":{"line":108,"column":87,"offset":3527},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":108,"column":87,"offset":3527},"end":{"line":108,"column":93,"offset":3533},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">labelCfg</code>","position":{"start":{"line":108,"column":93,"offset":3533},"end":{"line":108,"column":103,"offset":3543},"indent":[]}},{"type":"text","value":" 配置项进行文本的配置,使之达到如下图效果。","position":{"start":{"line":108,"column":103,"offset":3543},"end":{"line":108,"column":125,"offset":3565},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":108,"column":125,"offset":3565},"end":{"line":108,"column":131,"offset":3571},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570871169722-1012d863-0f4c-410d-985d-93028323a7af.png#align=left&display=inline&height=77&name=image.png&originHeight=154&originWidth=156&search=&size=19178&status=done&width=78","alt":"image.png","position":{"start":{"line":108,"column":131,"offset":3571},"end":{"line":108,"column":369,"offset":3809},"indent":[]}}],"position":{"start":{"line":108,"column":1,"offset":3441},"end":{"line":108,"column":369,"offset":3809},"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\">'center'</span><span class=\"token punctuation\">,</span>\n style<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n fill<span class=\"token punctuation\">:</span> <span class=\"token string\">'#9254de'</span><span class=\"token punctuation\">,</span>\n fontSize<span class=\"token punctuation\">:</span> <span class=\"token number\">18</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 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":109,"column":1,"offset":3810},"end":{"line":127,"column":4,"offset":4074},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"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":130,"column":5,"offset":4081},"end":{"line":130,"column":21,"offset":4097},"indent":[]}}],"position":{"start":{"line":130,"column":1,"offset":4077},"end":{"line":130,"column":21,"offset":4097},"indent":[]},"data":{"id":"边的连入点-linkpoints","htmlAttributes":{"id":"边的连入点-linkpoints"},"hProperties":{"id":"边的连入点-linkpoints"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过配置 ","position":{"start":{"line":131,"column":1,"offset":4098},"end":{"line":131,"column":16,"offset":4113},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">linkPoints</code>","position":{"start":{"line":131,"column":16,"offset":4113},"end":{"line":131,"column":28,"offset":4125},"indent":[]}},{"type":"text","value":" ,可以指定圆周围「上、下、左、右」四个方向上边的连入点。","position":{"start":{"line":131,"column":28,"offset":4125},"end":{"line":131,"column":57,"offset":4154},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":131,"column":57,"offset":4154},"end":{"line":131,"column":63,"offset":4160},"indent":[]}},{"type":"text","value":"说明 虽然每个三角形只有三个顶点,但不同方向的三角形顶点位置不同。","position":{"start":{"line":131,"column":63,"offset":4160},"end":{"line":131,"column":96,"offset":4193},"indent":[]}}],"position":{"start":{"line":131,"column":1,"offset":4098},"end":{"line":131,"column":96,"offset":4193},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":133,"column":3,"offset":4197},"end":{"line":133,"column":5,"offset":4199},"indent":[]}}],"position":{"start":{"line":133,"column":3,"offset":4197},"end":{"line":133,"column":5,"offset":4199},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":133,"column":8,"offset":4202},"end":{"line":133,"column":10,"offset":4204},"indent":[]}}],"position":{"start":{"line":133,"column":8,"offset":4202},"end":{"line":133,"column":10,"offset":4204},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":133,"column":13,"offset":4207},"end":{"line":133,"column":15,"offset":4209},"indent":[]}}],"position":{"start":{"line":133,"column":13,"offset":4207},"end":{"line":133,"column":15,"offset":4209},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":133,"column":18,"offset":4212},"end":{"line":133,"column":20,"offset":4214},"indent":[]}}],"position":{"start":{"line":133,"column":18,"offset":4212},"end":{"line":133,"column":20,"offset":4214},"indent":[]}}],"position":{"start":{"line":133,"column":1,"offset":4195},"end":{"line":133,"column":22,"offset":4216},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"top","position":{"start":{"line":135,"column":3,"offset":4245},"end":{"line":135,"column":6,"offset":4248},"indent":[]}}],"position":{"start":{"line":135,"column":3,"offset":4245},"end":{"line":135,"column":6,"offset":4248},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示上部的连接点","position":{"start":{"line":135,"column":9,"offset":4251},"end":{"line":135,"column":19,"offset":4261},"indent":[]}}],"position":{"start":{"line":135,"column":9,"offset":4251},"end":{"line":135,"column":19,"offset":4261},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":135,"column":22,"offset":4264},"end":{"line":135,"column":29,"offset":4271},"indent":[]}}],"position":{"start":{"line":135,"column":22,"offset":4264},"end":{"line":135,"column":29,"offset":4271},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":135,"column":32,"offset":4274},"end":{"line":135,"column":40,"offset":4282},"indent":[]}}],"position":{"start":{"line":135,"column":32,"offset":4274},"end":{"line":135,"column":40,"offset":4282},"indent":[]}}],"position":{"start":{"line":135,"column":1,"offset":4243},"end":{"line":135,"column":42,"offset":4284},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"bottom","position":{"start":{"line":136,"column":3,"offset":4287},"end":{"line":136,"column":9,"offset":4293},"indent":[]}}],"position":{"start":{"line":136,"column":3,"offset":4287},"end":{"line":136,"column":9,"offset":4293},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示底部的连接点","position":{"start":{"line":136,"column":12,"offset":4296},"end":{"line":136,"column":22,"offset":4306},"indent":[]}}],"position":{"start":{"line":136,"column":12,"offset":4296},"end":{"line":136,"column":22,"offset":4306},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":136,"column":25,"offset":4309},"end":{"line":136,"column":32,"offset":4316},"indent":[]}}],"position":{"start":{"line":136,"column":25,"offset":4309},"end":{"line":136,"column":32,"offset":4316},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":136,"column":35,"offset":4319},"end":{"line":136,"column":43,"offset":4327},"indent":[]}}],"position":{"start":{"line":136,"column":35,"offset":4319},"end":{"line":136,"column":43,"offset":4327},"indent":[]}}],"position":{"start":{"line":136,"column":1,"offset":4285},"end":{"line":136,"column":45,"offset":4329},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"left","position":{"start":{"line":137,"column":3,"offset":4332},"end":{"line":137,"column":7,"offset":4336},"indent":[]}}],"position":{"start":{"line":137,"column":3,"offset":4332},"end":{"line":137,"column":7,"offset":4336},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示左侧的连接点","position":{"start":{"line":137,"column":10,"offset":4339},"end":{"line":137,"column":20,"offset":4349},"indent":[]}}],"position":{"start":{"line":137,"column":10,"offset":4339},"end":{"line":137,"column":20,"offset":4349},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":137,"column":23,"offset":4352},"end":{"line":137,"column":30,"offset":4359},"indent":[]}}],"position":{"start":{"line":137,"column":23,"offset":4352},"end":{"line":137,"column":30,"offset":4359},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":137,"column":33,"offset":4362},"end":{"line":137,"column":41,"offset":4370},"indent":[]}}],"position":{"start":{"line":137,"column":33,"offset":4362},"end":{"line":137,"column":41,"offset":4370},"indent":[]}}],"position":{"start":{"line":137,"column":1,"offset":4330},"end":{"line":137,"column":43,"offset":4372},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"right","position":{"start":{"line":138,"column":3,"offset":4375},"end":{"line":138,"column":8,"offset":4380},"indent":[]}}],"position":{"start":{"line":138,"column":3,"offset":4375},"end":{"line":138,"column":8,"offset":4380},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示右侧的连接点","position":{"start":{"line":138,"column":11,"offset":4383},"end":{"line":138,"column":21,"offset":4393},"indent":[]}}],"position":{"start":{"line":138,"column":11,"offset":4383},"end":{"line":138,"column":21,"offset":4393},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":138,"column":24,"offset":4396},"end":{"line":138,"column":31,"offset":4403},"indent":[]}}],"position":{"start":{"line":138,"column":24,"offset":4396},"end":{"line":138,"column":31,"offset":4403},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":138,"column":34,"offset":4406},"end":{"line":138,"column":42,"offset":4414},"indent":[]}}],"position":{"start":{"line":138,"column":34,"offset":4406},"end":{"line":138,"column":42,"offset":4414},"indent":[]}}],"position":{"start":{"line":138,"column":1,"offset":4373},"end":{"line":138,"column":44,"offset":4416},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"size","position":{"start":{"line":139,"column":3,"offset":4419},"end":{"line":139,"column":7,"offset":4423},"indent":[]}}],"position":{"start":{"line":139,"column":3,"offset":4419},"end":{"line":139,"column":7,"offset":4423},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的大小","position":{"start":{"line":139,"column":10,"offset":4426},"end":{"line":139,"column":16,"offset":4432},"indent":[]}}],"position":{"start":{"line":139,"column":10,"offset":4426},"end":{"line":139,"column":16,"offset":4432},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":139,"column":19,"offset":4435},"end":{"line":139,"column":25,"offset":4441},"indent":[]}}],"position":{"start":{"line":139,"column":19,"offset":4435},"end":{"line":139,"column":25,"offset":4441},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为3","position":{"start":{"line":139,"column":28,"offset":4444},"end":{"line":139,"column":32,"offset":4448},"indent":[]}}],"position":{"start":{"line":139,"column":28,"offset":4444},"end":{"line":139,"column":32,"offset":4448},"indent":[]}}],"position":{"start":{"line":139,"column":1,"offset":4417},"end":{"line":139,"column":34,"offset":4450},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"fill","position":{"start":{"line":140,"column":3,"offset":4453},"end":{"line":140,"column":7,"offset":4457},"indent":[]}}],"position":{"start":{"line":140,"column":3,"offset":4453},"end":{"line":140,"column":7,"offset":4457},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的填充色","position":{"start":{"line":140,"column":10,"offset":4460},"end":{"line":140,"column":17,"offset":4467},"indent":[]}}],"position":{"start":{"line":140,"column":10,"offset":4460},"end":{"line":140,"column":17,"offset":4467},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":140,"column":20,"offset":4470},"end":{"line":140,"column":26,"offset":4476},"indent":[]}}],"position":{"start":{"line":140,"column":20,"offset":4470},"end":{"line":140,"column":26,"offset":4476},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为#72CC4A","position":{"start":{"line":140,"column":29,"offset":4479},"end":{"line":140,"column":39,"offset":4489},"indent":[]}}],"position":{"start":{"line":140,"column":29,"offset":4479},"end":{"line":140,"column":39,"offset":4489},"indent":[]}}],"position":{"start":{"line":140,"column":1,"offset":4451},"end":{"line":140,"column":41,"offset":4491},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"stroke","position":{"start":{"line":141,"column":3,"offset":4494},"end":{"line":141,"column":9,"offset":4500},"indent":[]}}],"position":{"start":{"line":141,"column":3,"offset":4494},"end":{"line":141,"column":9,"offset":4500},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的边框颜色","position":{"start":{"line":141,"column":12,"offset":4503},"end":{"line":141,"column":20,"offset":4511},"indent":[]}}],"position":{"start":{"line":141,"column":12,"offset":4503},"end":{"line":141,"column":20,"offset":4511},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":141,"column":23,"offset":4514},"end":{"line":141,"column":29,"offset":4520},"indent":[]}}],"position":{"start":{"line":141,"column":23,"offset":4514},"end":{"line":141,"column":29,"offset":4520},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为#72CC4A","position":{"start":{"line":141,"column":32,"offset":4523},"end":{"line":141,"column":42,"offset":4533},"indent":[]}}],"position":{"start":{"line":141,"column":32,"offset":4523},"end":{"line":141,"column":42,"offset":4533},"indent":[]}}],"position":{"start":{"line":141,"column":1,"offset":4492},"end":{"line":141,"column":44,"offset":4535},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"lineWidth","position":{"start":{"line":142,"column":3,"offset":4538},"end":{"line":142,"column":12,"offset":4547},"indent":[]}}],"position":{"start":{"line":142,"column":3,"offset":4538},"end":{"line":142,"column":12,"offset":4547},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点边框的宽度","position":{"start":{"line":142,"column":15,"offset":4550},"end":{"line":142,"column":23,"offset":4558},"indent":[]}}],"position":{"start":{"line":142,"column":15,"offset":4550},"end":{"line":142,"column":23,"offset":4558},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":142,"column":26,"offset":4561},"end":{"line":142,"column":32,"offset":4567},"indent":[]}}],"position":{"start":{"line":142,"column":26,"offset":4561},"end":{"line":142,"column":32,"offset":4567},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为1","position":{"start":{"line":142,"column":35,"offset":4570},"end":{"line":142,"column":39,"offset":4574},"indent":[]}}],"position":{"start":{"line":142,"column":35,"offset":4570},"end":{"line":142,"column":39,"offset":4574},"indent":[]}}],"position":{"start":{"line":142,"column":1,"offset":4536},"end":{"line":142,"column":41,"offset":4576},"indent":[]}}],"position":{"start":{"line":133,"column":1,"offset":4195},"end":{"line":142,"column":41,"offset":4576},"indent":[1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"基于上面 ","position":{"start":{"line":145,"column":1,"offset":4579},"end":{"line":145,"column":6,"offset":4584},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":145,"column":7,"offset":4585},"end":{"line":145,"column":17,"offset":4595},"indent":[]}}],"position":{"start":{"line":145,"column":6,"offset":4584},"end":{"line":145,"column":31,"offset":4609},"indent":[]}},{"type":"text","value":" 中的代码,下面代码在 ","position":{"start":{"line":145,"column":31,"offset":4609},"end":{"line":145,"column":43,"offset":4621},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":145,"column":43,"offset":4621},"end":{"line":145,"column":56,"offset":4634},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":145,"column":56,"offset":4634},"end":{"line":145,"column":62,"offset":4640},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">linkPoints</code>","position":{"start":{"line":145,"column":62,"offset":4640},"end":{"line":145,"column":74,"offset":4652},"indent":[]}},{"type":"text","value":" 配置项进行连入点的配置,使之达到如下图效果。","position":{"start":{"line":145,"column":74,"offset":4652},"end":{"line":145,"column":97,"offset":4675},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":145,"column":97,"offset":4675},"end":{"line":145,"column":103,"offset":4681},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570871231609-9b1c4380-8e6a-4a63-8982-de8dcca6a4ee.png#align=left&display=inline&height=83&name=image.png&originHeight=166&originWidth=152&search=&size=20771&status=done&width=76","alt":"image.png","position":{"start":{"line":145,"column":103,"offset":4681},"end":{"line":145,"column":341,"offset":4919},"indent":[]}}],"position":{"start":{"line":145,"column":1,"offset":4579},"end":{"line":145,"column":341,"offset":4919},"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":146,"column":1,"offset":4920},"end":{"line":165,"column":4,"offset":5196},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"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":168,"column":5,"offset":5203},"end":{"line":168,"column":12,"offset":5210},"indent":[]}}],"position":{"start":{"line":168,"column":1,"offset":5199},"end":{"line":168,"column":12,"offset":5210},"indent":[]},"data":{"id":"图标-icon","htmlAttributes":{"id":"图标-icon"},"hProperties":{"id":"图标-icon"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过配置 ","position":{"start":{"line":169,"column":1,"offset":5211},"end":{"line":169,"column":16,"offset":5226},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">icon</code>","position":{"start":{"line":169,"column":16,"offset":5226},"end":{"line":169,"column":22,"offset":5232},"indent":[]}},{"type":"text","value":",可以在圆上显示小图标。","position":{"start":{"line":169,"column":22,"offset":5232},"end":{"line":169,"column":34,"offset":5244},"indent":[]}}],"position":{"start":{"line":169,"column":1,"offset":5211},"end":{"line":169,"column":34,"offset":5244},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":171,"column":3,"offset":5248},"end":{"line":171,"column":5,"offset":5250},"indent":[]}}],"position":{"start":{"line":171,"column":3,"offset":5248},"end":{"line":171,"column":5,"offset":5250},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":171,"column":8,"offset":5253},"end":{"line":171,"column":10,"offset":5255},"indent":[]}}],"position":{"start":{"line":171,"column":8,"offset":5253},"end":{"line":171,"column":10,"offset":5255},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":171,"column":13,"offset":5258},"end":{"line":171,"column":15,"offset":5260},"indent":[]}}],"position":{"start":{"line":171,"column":13,"offset":5258},"end":{"line":171,"column":15,"offset":5260},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":171,"column":18,"offset":5263},"end":{"line":171,"column":20,"offset":5265},"indent":[]}}],"position":{"start":{"line":171,"column":18,"offset":5263},"end":{"line":171,"column":20,"offset":5265},"indent":[]}}],"position":{"start":{"line":171,"column":1,"offset":5246},"end":{"line":171,"column":22,"offset":5267},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"show","position":{"start":{"line":173,"column":3,"offset":5296},"end":{"line":173,"column":7,"offset":5300},"indent":[]}}],"position":{"start":{"line":173,"column":3,"offset":5296},"end":{"line":173,"column":7,"offset":5300},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示 icon","position":{"start":{"line":173,"column":10,"offset":5303},"end":{"line":173,"column":19,"offset":5312},"indent":[]}}],"position":{"start":{"line":173,"column":10,"offset":5303},"end":{"line":173,"column":19,"offset":5312},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":173,"column":22,"offset":5315},"end":{"line":173,"column":29,"offset":5322},"indent":[]}}],"position":{"start":{"line":173,"column":22,"offset":5315},"end":{"line":173,"column":29,"offset":5322},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为 false,不显示","position":{"start":{"line":173,"column":32,"offset":5325},"end":{"line":173,"column":45,"offset":5338},"indent":[]}}],"position":{"start":{"line":173,"column":32,"offset":5325},"end":{"line":173,"column":45,"offset":5338},"indent":[]}}],"position":{"start":{"line":173,"column":1,"offset":5294},"end":{"line":173,"column":47,"offset":5340},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"width","position":{"start":{"line":174,"column":3,"offset":5343},"end":{"line":174,"column":8,"offset":5348},"indent":[]}}],"position":{"start":{"line":174,"column":3,"offset":5343},"end":{"line":174,"column":8,"offset":5348},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"icon 的宽度","position":{"start":{"line":174,"column":11,"offset":5351},"end":{"line":174,"column":19,"offset":5359},"indent":[]}}],"position":{"start":{"line":174,"column":11,"offset":5351},"end":{"line":174,"column":19,"offset":5359},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":174,"column":22,"offset":5362},"end":{"line":174,"column":28,"offset":5368},"indent":[]}}],"position":{"start":{"line":174,"column":22,"offset":5362},"end":{"line":174,"column":28,"offset":5368},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为 16","position":{"start":{"line":174,"column":31,"offset":5371},"end":{"line":174,"column":37,"offset":5377},"indent":[]}}],"position":{"start":{"line":174,"column":31,"offset":5371},"end":{"line":174,"column":37,"offset":5377},"indent":[]}}],"position":{"start":{"line":174,"column":1,"offset":5341},"end":{"line":174,"column":39,"offset":5379},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"height","position":{"start":{"line":175,"column":3,"offset":5382},"end":{"line":175,"column":9,"offset":5388},"indent":[]}}],"position":{"start":{"line":175,"column":3,"offset":5382},"end":{"line":175,"column":9,"offset":5388},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"icon 的高度","position":{"start":{"line":175,"column":12,"offset":5391},"end":{"line":175,"column":20,"offset":5399},"indent":[]}}],"position":{"start":{"line":175,"column":12,"offset":5391},"end":{"line":175,"column":20,"offset":5399},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":175,"column":23,"offset":5402},"end":{"line":175,"column":29,"offset":5408},"indent":[]}}],"position":{"start":{"line":175,"column":23,"offset":5402},"end":{"line":175,"column":29,"offset":5408},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为 16","position":{"start":{"line":175,"column":32,"offset":5411},"end":{"line":175,"column":38,"offset":5417},"indent":[]}}],"position":{"start":{"line":175,"column":32,"offset":5411},"end":{"line":175,"column":38,"offset":5417},"indent":[]}}],"position":{"start":{"line":175,"column":1,"offset":5380},"end":{"line":175,"column":40,"offset":5419},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"img","position":{"start":{"line":176,"column":3,"offset":5422},"end":{"line":176,"column":6,"offset":5425},"indent":[]}}],"position":{"start":{"line":176,"column":3,"offset":5422},"end":{"line":176,"column":6,"offset":5425},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"icon 的图片地址","position":{"start":{"line":176,"column":9,"offset":5428},"end":{"line":176,"column":19,"offset":5438},"indent":[]}}],"position":{"start":{"line":176,"column":9,"offset":5428},"end":{"line":176,"column":19,"offset":5438},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":176,"column":22,"offset":5441},"end":{"line":176,"column":28,"offset":5447},"indent":[]}}],"position":{"start":{"line":176,"column":22,"offset":5441},"end":{"line":176,"column":28,"offset":5447},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认有一个如下图中的图片","position":{"start":{"line":176,"column":31,"offset":5450},"end":{"line":176,"column":43,"offset":5462},"indent":[]}}],"position":{"start":{"line":176,"column":31,"offset":5450},"end":{"line":176,"column":43,"offset":5462},"indent":[]}}],"position":{"start":{"line":176,"column":1,"offset":5420},"end":{"line":176,"column":45,"offset":5464},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"offset","position":{"start":{"line":177,"column":5,"offset":5469},"end":{"line":177,"column":11,"offset":5475},"indent":[]}}],"position":{"start":{"line":177,"column":3,"offset":5467},"end":{"line":177,"column":13,"offset":5477},"indent":[]}}],"position":{"start":{"line":177,"column":3,"offset":5467},"end":{"line":177,"column":13,"offset":5477},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"icon 的偏移量","position":{"start":{"line":177,"column":18,"offset":5482},"end":{"line":177,"column":27,"offset":5491},"indent":[]}}],"position":{"start":{"line":177,"column":16,"offset":5480},"end":{"line":177,"column":29,"offset":5493},"indent":[]}}],"position":{"start":{"line":177,"column":16,"offset":5480},"end":{"line":177,"column":29,"offset":5493},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"Number","position":{"start":{"line":177,"column":34,"offset":5498},"end":{"line":177,"column":40,"offset":5504},"indent":[]}}],"position":{"start":{"line":177,"column":32,"offset":5496},"end":{"line":177,"column":42,"offset":5506},"indent":[]}}],"position":{"start":{"line":177,"column":32,"offset":5496},"end":{"line":177,"column":42,"offset":5506},"indent":[]}},{"type":"tableCell","children":[{"type":"strong","children":[{"type":"text","value":"默认为 0,triangle 节点的 icon 特有的配置","position":{"start":{"line":177,"column":47,"offset":5511},"end":{"line":177,"column":76,"offset":5540},"indent":[]}}],"position":{"start":{"line":177,"column":45,"offset":5509},"end":{"line":177,"column":78,"offset":5542},"indent":[]}}],"position":{"start":{"line":177,"column":45,"offset":5509},"end":{"line":177,"column":78,"offset":5542},"indent":[]}}],"position":{"start":{"line":177,"column":1,"offset":5465},"end":{"line":177,"column":80,"offset":5544},"indent":[]}}],"position":{"start":{"line":171,"column":1,"offset":5246},"end":{"line":177,"column":80,"offset":5544},"indent":[1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"基于上面 ","position":{"start":{"line":180,"column":1,"offset":5547},"end":{"line":180,"column":6,"offset":5552},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":180,"column":7,"offset":5553},"end":{"line":180,"column":17,"offset":5563},"indent":[]}}],"position":{"start":{"line":180,"column":6,"offset":5552},"end":{"line":180,"column":31,"offset":5577},"indent":[]}},{"type":"text","value":" 中的代码,下面代码在 ","position":{"start":{"line":180,"column":31,"offset":5577},"end":{"line":180,"column":43,"offset":5589},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":180,"column":43,"offset":5589},"end":{"line":180,"column":56,"offset":5602},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":180,"column":56,"offset":5602},"end":{"line":180,"column":62,"offset":5608},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">icon</code>","position":{"start":{"line":180,"column":62,"offset":5608},"end":{"line":180,"column":68,"offset":5614},"indent":[]}},{"type":"text","value":" 配置项进行图标的配置,使之达到如下图效果。","position":{"start":{"line":180,"column":68,"offset":5614},"end":{"line":180,"column":90,"offset":5636},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":180,"column":90,"offset":5636},"end":{"line":180,"column":96,"offset":5642},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570871318704-c2192872-f7fe-48b1-a74c-6875b642d4c1.png#align=left&display=inline&height=83&name=image.png&originHeight=166&originWidth=166&search=&size=26443&status=done&width=83","alt":"image.png","position":{"start":{"line":180,"column":96,"offset":5642},"end":{"line":180,"column":334,"offset":5880},"indent":[]}}],"position":{"start":{"line":180,"column":1,"offset":5547},"end":{"line":180,"column":334,"offset":5880},"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 width<span class=\"token punctuation\">:</span> <span class=\"token number\">30</span><span class=\"token punctuation\">,</span>\n height<span class=\"token punctuation\">:</span> <span class=\"token number\">30</span><span class=\"token punctuation\">,</span>\n offset<span class=\"token punctuation\">:</span> <span class=\"token number\">20</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":181,"column":1,"offset":5881},"end":{"line":198,"column":4,"offset":6113},"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":199,"column":1,"offset":6114}}}}