@antv/g6
Version:
graph visualization frame work
1 lines • 61.2 kB
JSON
{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-ast-fb52fa93acb6d984571009df99de7b09-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 内置了 rect 节点,其默认样式如下。标签文本位于矩形中央。","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":35,"offset":35},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":2,"column":35,"offset":35},"end":{"line":2,"column":41,"offset":41},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570868865728-a92337b4-fe84-438e-a6ca-43648095a610.png#align=left&display=inline&height=38&name=image.png&originHeight=76&originWidth=186&search=&size=4108&status=done&width=93","alt":"image.png","position":{"start":{"line":2,"column":41,"offset":41},"end":{"line":2,"column":277,"offset":277},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":277,"offset":277},"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":5,"column":4,"offset":283},"end":{"line":5,"column":8,"offset":287},"indent":[]}}],"position":{"start":{"line":5,"column":1,"offset":280},"end":{"line":5,"column":8,"offset":287},"indent":[]},"data":{"id":"使用方法","htmlAttributes":{"id":"使用方法"},"hProperties":{"id":"使用方法"}}},{"type":"paragraph","children":[{"type":"text","value":"如 ","position":{"start":{"line":6,"column":1,"offset":288},"end":{"line":6,"column":3,"offset":290},"indent":[]}},{"type":"link","title":null,"url":"../defaultNode","children":[{"type":"text","value":"内置节点","position":{"start":{"line":6,"column":4,"offset":291},"end":{"line":6,"column":8,"offset":295},"indent":[]}}],"position":{"start":{"line":6,"column":3,"offset":290},"end":{"line":6,"column":25,"offset":312},"indent":[]}},{"type":"text","value":" 一节所示,配置节点的方式有两种:实例化图时全局配置,在数据中动态配置。","position":{"start":{"line":6,"column":25,"offset":312},"end":{"line":6,"column":61,"offset":348},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":288},"end":{"line":6,"column":61,"offset":348},"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":9,"column":5,"offset":355},"end":{"line":9,"column":16,"offset":366},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":351},"end":{"line":9,"column":16,"offset":366},"indent":[]},"data":{"id":"1-实例化图时全局配置","htmlAttributes":{"id":"1-实例化图时全局配置"},"hProperties":{"id":"1-实例化图时全局配置"}}},{"type":"paragraph","children":[{"type":"text","value":"用户在实例化 Graph 时候可以通过 ","position":{"start":{"line":10,"column":1,"offset":367},"end":{"line":10,"column":21,"offset":387},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":10,"column":21,"offset":387},"end":{"line":10,"column":34,"offset":400},"indent":[]}},{"type":"text","value":" 指定 ","position":{"start":{"line":10,"column":34,"offset":400},"end":{"line":10,"column":38,"offset":404},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">shape</code>","position":{"start":{"line":10,"column":38,"offset":404},"end":{"line":10,"column":45,"offset":411},"indent":[]}},{"type":"text","value":" 为 ","position":{"start":{"line":10,"column":45,"offset":411},"end":{"line":10,"column":48,"offset":414},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">'rect'</code>","position":{"start":{"line":10,"column":48,"offset":414},"end":{"line":10,"column":56,"offset":422},"indent":[]}},{"type":"text","value":",即可使用 ","position":{"start":{"line":10,"column":56,"offset":422},"end":{"line":10,"column":62,"offset":428},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">rect</code>","position":{"start":{"line":10,"column":62,"offset":428},"end":{"line":10,"column":68,"offset":434},"indent":[]}},{"type":"text","value":" 节点。","position":{"start":{"line":10,"column":68,"offset":434},"end":{"line":10,"column":72,"offset":438},"indent":[]}}],"position":{"start":{"line":10,"column":1,"offset":367},"end":{"line":10,"column":72,"offset":438},"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\">'rect'</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":11,"column":1,"offset":439},"end":{"line":21,"column":4,"offset":596},"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":24,"column":5,"offset":603},"end":{"line":24,"column":15,"offset":613},"indent":[]}}],"position":{"start":{"line":24,"column":1,"offset":599},"end":{"line":24,"column":15,"offset":613},"indent":[]},"data":{"id":"2-在数据中动态配置","htmlAttributes":{"id":"2-在数据中动态配置"},"hProperties":{"id":"2-在数据中动态配置"}}},{"type":"paragraph","children":[{"type":"text","value":"如果需要使不同节点有不同的配置,可以将配置写入到节点数据中。这种配置方式可以通过下面代码的形式直接写入数据,也可以通过遍历数据的方式写入。","position":{"start":{"line":25,"column":1,"offset":614},"end":{"line":25,"column":70,"offset":683},"indent":[]}}],"position":{"start":{"line":25,"column":1,"offset":614},"end":{"line":25,"column":70,"offset":683},"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\">'rect'</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><span class=\"token punctuation\">;</span></code></pre></div>","position":{"start":{"line":26,"column":1,"offset":684},"end":{"line":39,"column":4,"offset":838},"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":42,"column":4,"offset":844},"end":{"line":42,"column":9,"offset":849},"indent":[]}}],"position":{"start":{"line":42,"column":1,"offset":841},"end":{"line":42,"column":9,"offset":849},"indent":[]},"data":{"id":"配置项说明","htmlAttributes":{"id":"配置项说明"},"hProperties":{"id":"配置项说明"}}},{"type":"paragraph","children":[{"type":"text","value":"rect 节点支持以下的配置项,对于 Object 类型的配置项将在后面有详细讲解:","position":{"start":{"line":43,"column":1,"offset":850},"end":{"line":43,"column":43,"offset":892},"indent":[]}}],"position":{"start":{"line":43,"column":1,"offset":850},"end":{"line":43,"column":43,"offset":892},"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":896},"end":{"line":45,"column":5,"offset":898},"indent":[]}}],"position":{"start":{"line":45,"column":3,"offset":896},"end":{"line":45,"column":5,"offset":898},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":45,"column":8,"offset":901},"end":{"line":45,"column":10,"offset":903},"indent":[]}}],"position":{"start":{"line":45,"column":8,"offset":901},"end":{"line":45,"column":10,"offset":903},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":45,"column":13,"offset":906},"end":{"line":45,"column":15,"offset":908},"indent":[]}}],"position":{"start":{"line":45,"column":13,"offset":906},"end":{"line":45,"column":15,"offset":908},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":45,"column":18,"offset":911},"end":{"line":45,"column":20,"offset":913},"indent":[]}}],"position":{"start":{"line":45,"column":18,"offset":911},"end":{"line":45,"column":20,"offset":913},"indent":[]}}],"position":{"start":{"line":45,"column":1,"offset":894},"end":{"line":45,"column":22,"offset":915},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"size","position":{"start":{"line":47,"column":3,"offset":944},"end":{"line":47,"column":7,"offset":948},"indent":[]}}],"position":{"start":{"line":47,"column":3,"offset":944},"end":{"line":47,"column":7,"offset":948},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"rect的宽高","position":{"start":{"line":47,"column":10,"offset":951},"end":{"line":47,"column":17,"offset":958},"indent":[]}}],"position":{"start":{"line":47,"column":10,"offset":951},"end":{"line":47,"column":17,"offset":958},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":47,"column":20,"offset":961},"end":{"line":47,"column":26,"offset":967},"indent":[]}}],"position":{"start":{"line":47,"column":20,"offset":961},"end":{"line":47,"column":26,"offset":967},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Array","position":{"start":{"line":47,"column":29,"offset":970},"end":{"line":47,"column":34,"offset":975},"indent":[]}}],"position":{"start":{"line":47,"column":29,"offset":970},"end":{"line":47,"column":34,"offset":975},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"size为数组时:第一个值表示宽度,第二个表示高度;","position":{"start":{"line":47,"column":37,"offset":978},"end":{"line":47,"column":63,"offset":1004},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":47,"column":63,"offset":1004},"end":{"line":47,"column":69,"offset":1010},"indent":[]}},{"type":"text","value":"size为一个数值时:表示宽高相等","position":{"start":{"line":47,"column":69,"offset":1010},"end":{"line":47,"column":86,"offset":1027},"indent":[]}}],"position":{"start":{"line":47,"column":37,"offset":978},"end":{"line":47,"column":86,"offset":1027},"indent":[]}}],"position":{"start":{"line":47,"column":1,"offset":942},"end":{"line":47,"column":88,"offset":1029},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"style","position":{"start":{"line":48,"column":3,"offset":1032},"end":{"line":48,"column":8,"offset":1037},"indent":[]}}],"position":{"start":{"line":48,"column":3,"offset":1032},"end":{"line":48,"column":8,"offset":1037},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"rect默认样式","position":{"start":{"line":48,"column":11,"offset":1040},"end":{"line":48,"column":19,"offset":1048},"indent":[]}}],"position":{"start":{"line":48,"column":11,"offset":1040},"end":{"line":48,"column":19,"offset":1048},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":48,"column":22,"offset":1051},"end":{"line":48,"column":28,"offset":1057},"indent":[]}}],"position":{"start":{"line":48,"column":22,"offset":1051},"end":{"line":48,"column":28,"offset":1057},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Canvas支持的属性","position":{"start":{"line":48,"column":31,"offset":1060},"end":{"line":48,"column":42,"offset":1071},"indent":[]}}],"position":{"start":{"line":48,"column":31,"offset":1060},"end":{"line":48,"column":42,"offset":1071},"indent":[]}}],"position":{"start":{"line":48,"column":1,"offset":1030},"end":{"line":48,"column":44,"offset":1073},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"labelCfg","position":{"start":{"line":49,"column":3,"offset":1076},"end":{"line":49,"column":11,"offset":1084},"indent":[]}}],"position":{"start":{"line":49,"column":3,"offset":1076},"end":{"line":49,"column":11,"offset":1084},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"文件配置项","position":{"start":{"line":49,"column":14,"offset":1087},"end":{"line":49,"column":19,"offset":1092},"indent":[]}}],"position":{"start":{"line":49,"column":14,"offset":1087},"end":{"line":49,"column":19,"offset":1092},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":49,"column":22,"offset":1095},"end":{"line":49,"column":28,"offset":1101},"indent":[]}}],"position":{"start":{"line":49,"column":22,"offset":1095},"end":{"line":49,"column":28,"offset":1101},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":49,"column":32,"offset":1105},"end":{"line":49,"column":32,"offset":1105},"indent":[]}}],"position":{"start":{"line":49,"column":1,"offset":1074},"end":{"line":49,"column":33,"offset":1106},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"stateStyles","position":{"start":{"line":50,"column":3,"offset":1109},"end":{"line":50,"column":14,"offset":1120},"indent":[]}}],"position":{"start":{"line":50,"column":3,"offset":1109},"end":{"line":50,"column":14,"offset":1120},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"各状态下的样式","position":{"start":{"line":50,"column":17,"offset":1123},"end":{"line":50,"column":24,"offset":1130},"indent":[]}}],"position":{"start":{"line":50,"column":17,"offset":1123},"end":{"line":50,"column":24,"offset":1130},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":50,"column":27,"offset":1133},"end":{"line":50,"column":33,"offset":1139},"indent":[]}}],"position":{"start":{"line":50,"column":27,"offset":1133},"end":{"line":50,"column":33,"offset":1139},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"只对keyShape起作用","position":{"start":{"line":50,"column":36,"offset":1142},"end":{"line":50,"column":49,"offset":1155},"indent":[]}}],"position":{"start":{"line":50,"column":36,"offset":1142},"end":{"line":50,"column":49,"offset":1155},"indent":[]}}],"position":{"start":{"line":50,"column":1,"offset":1107},"end":{"line":50,"column":51,"offset":1157},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"linkPoints","position":{"start":{"line":51,"column":3,"offset":1160},"end":{"line":51,"column":13,"offset":1170},"indent":[]}}],"position":{"start":{"line":51,"column":3,"offset":1160},"end":{"line":51,"column":13,"offset":1170},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"rect上的链接点","position":{"start":{"line":51,"column":16,"offset":1173},"end":{"line":51,"column":25,"offset":1182},"indent":[]}}],"position":{"start":{"line":51,"column":16,"offset":1173},"end":{"line":51,"column":25,"offset":1182},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Object","position":{"start":{"line":51,"column":28,"offset":1185},"end":{"line":51,"column":34,"offset":1191},"indent":[]}}],"position":{"start":{"line":51,"column":28,"offset":1185},"end":{"line":51,"column":34,"offset":1191},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认不显示","position":{"start":{"line":51,"column":37,"offset":1194},"end":{"line":51,"column":42,"offset":1199},"indent":[]}}],"position":{"start":{"line":51,"column":37,"offset":1194},"end":{"line":51,"column":42,"offset":1199},"indent":[]}}],"position":{"start":{"line":51,"column":1,"offset":1158},"end":{"line":51,"column":44,"offset":1201},"indent":[]}}],"position":{"start":{"line":45,"column":1,"offset":894},"end":{"line":51,"column":44,"offset":1201},"indent":[1,1,1,1,1,1]}},{"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":55,"column":5,"offset":1209},"end":{"line":55,"column":15,"offset":1219},"indent":[]}}],"position":{"start":{"line":55,"column":1,"offset":1205},"end":{"line":55,"column":15,"offset":1219},"indent":[]},"data":{"id":"样式属性-style","htmlAttributes":{"id":"样式属性-style"},"hProperties":{"id":"样式属性-style"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过 ","position":{"start":{"line":56,"column":1,"offset":1220},"end":{"line":56,"column":14,"offset":1233},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">style</code>","position":{"start":{"line":56,"column":14,"offset":1233},"end":{"line":56,"column":21,"offset":1240},"indent":[]}},{"type":"text","value":" 配置来修改 ","position":{"start":{"line":56,"column":21,"offset":1240},"end":{"line":56,"column":28,"offset":1247},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">rect</code>","position":{"start":{"line":56,"column":28,"offset":1247},"end":{"line":56,"column":34,"offset":1253},"indent":[]}},{"type":"text","value":" 的填充色、边框颜色、阴影等属性。","position":{"start":{"line":56,"column":34,"offset":1253},"end":{"line":56,"column":51,"offset":1270},"indent":[]}}],"position":{"start":{"line":56,"column":1,"offset":1220},"end":{"line":56,"column":51,"offset":1270},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":58,"column":3,"offset":1274},"end":{"line":58,"column":5,"offset":1276},"indent":[]}}],"position":{"start":{"line":58,"column":3,"offset":1274},"end":{"line":58,"column":5,"offset":1276},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":58,"column":8,"offset":1279},"end":{"line":58,"column":10,"offset":1281},"indent":[]}}],"position":{"start":{"line":58,"column":8,"offset":1279},"end":{"line":58,"column":10,"offset":1281},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":58,"column":13,"offset":1284},"end":{"line":58,"column":15,"offset":1286},"indent":[]}}],"position":{"start":{"line":58,"column":13,"offset":1284},"end":{"line":58,"column":15,"offset":1286},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":58,"column":18,"offset":1289},"end":{"line":58,"column":20,"offset":1291},"indent":[]}}],"position":{"start":{"line":58,"column":18,"offset":1289},"end":{"line":58,"column":20,"offset":1291},"indent":[]}}],"position":{"start":{"line":58,"column":1,"offset":1272},"end":{"line":58,"column":22,"offset":1293},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"radius","position":{"start":{"line":60,"column":3,"offset":1322},"end":{"line":60,"column":9,"offset":1328},"indent":[]}}],"position":{"start":{"line":60,"column":3,"offset":1322},"end":{"line":60,"column":9,"offset":1328},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"圆角半径","position":{"start":{"line":60,"column":12,"offset":1331},"end":{"line":60,"column":16,"offset":1335},"indent":[]}}],"position":{"start":{"line":60,"column":12,"offset":1331},"end":{"line":60,"column":16,"offset":1335},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":60,"column":19,"offset":1338},"end":{"line":60,"column":25,"offset":1344},"indent":[]}}],"position":{"start":{"line":60,"column":19,"offset":1338},"end":{"line":60,"column":25,"offset":1344},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为直角矩形","position":{"start":{"line":60,"column":28,"offset":1347},"end":{"line":60,"column":35,"offset":1354},"indent":[]}}],"position":{"start":{"line":60,"column":28,"offset":1347},"end":{"line":60,"column":35,"offset":1354},"indent":[]}}],"position":{"start":{"line":60,"column":1,"offset":1320},"end":{"line":60,"column":37,"offset":1356},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"stroke","position":{"start":{"line":61,"column":3,"offset":1359},"end":{"line":61,"column":9,"offset":1365},"indent":[]}}],"position":{"start":{"line":61,"column":3,"offset":1359},"end":{"line":61,"column":9,"offset":1365},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"描边颜色","position":{"start":{"line":61,"column":12,"offset":1368},"end":{"line":61,"column":16,"offset":1372},"indent":[]}}],"position":{"start":{"line":61,"column":12,"offset":1368},"end":{"line":61,"column":16,"offset":1372},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":61,"column":19,"offset":1375},"end":{"line":61,"column":25,"offset":1381},"indent":[]}}],"position":{"start":{"line":61,"column":19,"offset":1375},"end":{"line":61,"column":25,"offset":1381},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":61,"column":29,"offset":1385},"end":{"line":61,"column":29,"offset":1385},"indent":[]}}],"position":{"start":{"line":61,"column":1,"offset":1357},"end":{"line":61,"column":30,"offset":1386},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"lineWidth","position":{"start":{"line":62,"column":3,"offset":1389},"end":{"line":62,"column":12,"offset":1398},"indent":[]}}],"position":{"start":{"line":62,"column":3,"offset":1389},"end":{"line":62,"column":12,"offset":1398},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"描边粗细","position":{"start":{"line":62,"column":15,"offset":1401},"end":{"line":62,"column":19,"offset":1405},"indent":[]}}],"position":{"start":{"line":62,"column":15,"offset":1401},"end":{"line":62,"column":19,"offset":1405},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":62,"column":22,"offset":1408},"end":{"line":62,"column":28,"offset":1414},"indent":[]}}],"position":{"start":{"line":62,"column":22,"offset":1408},"end":{"line":62,"column":28,"offset":1414},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为 1","position":{"start":{"line":62,"column":31,"offset":1417},"end":{"line":62,"column":36,"offset":1422},"indent":[]}}],"position":{"start":{"line":62,"column":31,"offset":1417},"end":{"line":62,"column":36,"offset":1422},"indent":[]}}],"position":{"start":{"line":62,"column":1,"offset":1387},"end":{"line":62,"column":38,"offset":1424},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"fill","position":{"start":{"line":63,"column":3,"offset":1427},"end":{"line":63,"column":7,"offset":1431},"indent":[]}}],"position":{"start":{"line":63,"column":3,"offset":1427},"end":{"line":63,"column":7,"offset":1431},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"填充色","position":{"start":{"line":63,"column":10,"offset":1434},"end":{"line":63,"column":13,"offset":1437},"indent":[]}}],"position":{"start":{"line":63,"column":10,"offset":1434},"end":{"line":63,"column":13,"offset":1437},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":63,"column":16,"offset":1440},"end":{"line":63,"column":22,"offset":1446},"indent":[]}}],"position":{"start":{"line":63,"column":16,"offset":1440},"end":{"line":63,"column":22,"offset":1446},"indent":[]}},{"type":"tableCell","children":[],"position":{"start":{"line":63,"column":26,"offset":1450},"end":{"line":63,"column":26,"offset":1450},"indent":[]}}],"position":{"start":{"line":63,"column":1,"offset":1425},"end":{"line":63,"column":27,"offset":1451},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"fillOpacity","position":{"start":{"line":64,"column":3,"offset":1454},"end":{"line":64,"column":14,"offset":1465},"indent":[]}}],"position":{"start":{"line":64,"column":3,"offset":1454},"end":{"line":64,"column":14,"offset":1465},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"透明度","position":{"start":{"line":64,"column":17,"offset":1468},"end":{"line":64,"column":20,"offset":1471},"indent":[]}}],"position":{"start":{"line":64,"column":17,"offset":1468},"end":{"line":64,"column":20,"offset":1471},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":64,"column":23,"offset":1474},"end":{"line":64,"column":29,"offset":1480},"indent":[]}}],"position":{"start":{"line":64,"column":23,"offset":1474},"end":{"line":64,"column":29,"offset":1480},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为 1","position":{"start":{"line":64,"column":32,"offset":1483},"end":{"line":64,"column":37,"offset":1488},"indent":[]}}],"position":{"start":{"line":64,"column":32,"offset":1483},"end":{"line":64,"column":37,"offset":1488},"indent":[]}}],"position":{"start":{"line":64,"column":1,"offset":1452},"end":{"line":64,"column":39,"offset":1490},"indent":[]}}],"position":{"start":{"line":58,"column":1,"offset":1272},"end":{"line":64,"column":39,"offset":1490},"indent":[1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"下面代码演示在实例化图时全局配置方法中配置 ","position":{"start":{"line":67,"column":1,"offset":1493},"end":{"line":67,"column":23,"offset":1515},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">style</code>","position":{"start":{"line":67,"column":23,"offset":1515},"end":{"line":67,"column":30,"offset":1522},"indent":[]}},{"type":"text","value":",使之达到如下图效果。","position":{"start":{"line":67,"column":30,"offset":1522},"end":{"line":67,"column":41,"offset":1533},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":67,"column":41,"offset":1533},"end":{"line":67,"column":47,"offset":1539},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570869202677-0b925ae9-b59b-4264-b4c8-2c8e7aaf1ae7.png#align=left&display=inline&height=40&name=image.png&originHeight=80&originWidth=208&search=&size=8531&status=done&width=104","alt":"image.png","position":{"start":{"line":67,"column":47,"offset":1539},"end":{"line":67,"column":284,"offset":1776},"indent":[]}}],"position":{"start":{"line":67,"column":1,"offset":1493},"end":{"line":67,"column":284,"offset":1776},"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\">'rect'</span><span class=\"token punctuation\">,</span>\n label<span class=\"token punctuation\">:</span> <span class=\"token string\">'rect'</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\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\">500</span><span class=\"token punctuation\">,</span>\n height<span class=\"token punctuation\">:</span> <span class=\"token number\">300</span><span class=\"token punctuation\">,</span>\n defaultNode<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n <span class=\"token comment\">// shape: 'rect', // 在数据中已经指定了 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 radius<span class=\"token punctuation\">:</span> <span class=\"token number\">10</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":68,"column":1,"offset":1777},"end":{"line":94,"column":4,"offset":2186},"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":97,"column":5,"offset":2193},"end":{"line":97,"column":20,"offset":2208},"indent":[]}}],"position":{"start":{"line":97,"column":1,"offset":2189},"end":{"line":97,"column":20,"offset":2208},"indent":[]},"data":{"id":"标签文本配置-labelcfg","htmlAttributes":{"id":"标签文本配置-labelcfg"},"hProperties":{"id":"标签文本配置-labelcfg"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过 ","position":{"start":{"line":98,"column":1,"offset":2209},"end":{"line":98,"column":14,"offset":2222},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">labelCfg</code>","position":{"start":{"line":98,"column":14,"offset":2222},"end":{"line":98,"column":24,"offset":2232},"indent":[]}},{"type":"text","value":" 配置标签文本。基于上面 ","position":{"start":{"line":98,"column":24,"offset":2232},"end":{"line":98,"column":37,"offset":2245},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":98,"column":38,"offset":2246},"end":{"line":98,"column":48,"offset":2256},"indent":[]}}],"position":{"start":{"line":98,"column":37,"offset":2245},"end":{"line":98,"column":62,"offset":2270},"indent":[]}},{"type":"text","value":" 中的代码,下面代码在 ","position":{"start":{"line":98,"column":62,"offset":2270},"end":{"line":98,"column":74,"offset":2282},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":98,"column":74,"offset":2282},"end":{"line":98,"column":87,"offset":2295},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":98,"column":87,"offset":2295},"end":{"line":98,"column":93,"offset":2301},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">labelCfg</code>","position":{"start":{"line":98,"column":93,"offset":2301},"end":{"line":98,"column":103,"offset":2311},"indent":[]}},{"type":"text","value":" 配置项进行文本的配置,使之达到如下图效果。","position":{"start":{"line":98,"column":103,"offset":2311},"end":{"line":98,"column":125,"offset":2333},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":98,"column":125,"offset":2333},"end":{"line":98,"column":131,"offset":2339},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570869320349-99ced30f-2d4f-4dbb-bb81-0217f8821d3b.png#align=left&display=inline&height=53&name=image.png&originHeight=106&originWidth=190&search=&size=10308&status=done&width=95","alt":"image.png","position":{"start":{"line":98,"column":131,"offset":2339},"end":{"line":98,"column":369,"offset":2577},"indent":[]}}],"position":{"start":{"line":98,"column":1,"offset":2209},"end":{"line":98,"column":369,"offset":2577},"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 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 position<span class=\"token punctuation\">:</span> <span class=\"token string\">'bottom'</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":99,"column":1,"offset":2578},"end":{"line":117,"column":4,"offset":2838},"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":120,"column":5,"offset":2845},"end":{"line":120,"column":21,"offset":2861},"indent":[]}}],"position":{"start":{"line":120,"column":1,"offset":2841},"end":{"line":120,"column":21,"offset":2861},"indent":[]},"data":{"id":"边的连入点-linkpoints","htmlAttributes":{"id":"边的连入点-linkpoints"},"hProperties":{"id":"边的连入点-linkpoints"}}},{"type":"paragraph","children":[{"type":"text","value":"Object 类型。通过配置 ","position":{"start":{"line":121,"column":1,"offset":2862},"end":{"line":121,"column":16,"offset":2877},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">linkPoints</code>","position":{"start":{"line":121,"column":16,"offset":2877},"end":{"line":121,"column":28,"offset":2889},"indent":[]}},{"type":"text","value":" ,可以指定矩形周围「上、下、左、右」四个方向上边的连入点。","position":{"start":{"line":121,"column":28,"offset":2889},"end":{"line":121,"column":58,"offset":2919},"indent":[]}}],"position":{"start":{"line":121,"column":1,"offset":2862},"end":{"line":121,"column":58,"offset":2919},"indent":[]}},{"type":"table","align":[null,null,null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"名称","position":{"start":{"line":123,"column":3,"offset":2923},"end":{"line":123,"column":5,"offset":2925},"indent":[]}}],"position":{"start":{"line":123,"column":3,"offset":2923},"end":{"line":123,"column":5,"offset":2925},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"含义","position":{"start":{"line":123,"column":8,"offset":2928},"end":{"line":123,"column":10,"offset":2930},"indent":[]}}],"position":{"start":{"line":123,"column":8,"offset":2928},"end":{"line":123,"column":10,"offset":2930},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"类型","position":{"start":{"line":123,"column":13,"offset":2933},"end":{"line":123,"column":15,"offset":2935},"indent":[]}}],"position":{"start":{"line":123,"column":13,"offset":2933},"end":{"line":123,"column":15,"offset":2935},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"备注","position":{"start":{"line":123,"column":18,"offset":2938},"end":{"line":123,"column":20,"offset":2940},"indent":[]}}],"position":{"start":{"line":123,"column":18,"offset":2938},"end":{"line":123,"column":20,"offset":2940},"indent":[]}}],"position":{"start":{"line":123,"column":1,"offset":2921},"end":{"line":123,"column":22,"offset":2942},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"top","position":{"start":{"line":125,"column":3,"offset":2971},"end":{"line":125,"column":6,"offset":2974},"indent":[]}}],"position":{"start":{"line":125,"column":3,"offset":2971},"end":{"line":125,"column":6,"offset":2974},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示上部的连接点","position":{"start":{"line":125,"column":9,"offset":2977},"end":{"line":125,"column":19,"offset":2987},"indent":[]}}],"position":{"start":{"line":125,"column":9,"offset":2977},"end":{"line":125,"column":19,"offset":2987},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":125,"column":22,"offset":2990},"end":{"line":125,"column":29,"offset":2997},"indent":[]}}],"position":{"start":{"line":125,"column":22,"offset":2990},"end":{"line":125,"column":29,"offset":2997},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":125,"column":32,"offset":3000},"end":{"line":125,"column":40,"offset":3008},"indent":[]}}],"position":{"start":{"line":125,"column":32,"offset":3000},"end":{"line":125,"column":40,"offset":3008},"indent":[]}}],"position":{"start":{"line":125,"column":1,"offset":2969},"end":{"line":125,"column":42,"offset":3010},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"bottom","position":{"start":{"line":126,"column":3,"offset":3013},"end":{"line":126,"column":9,"offset":3019},"indent":[]}}],"position":{"start":{"line":126,"column":3,"offset":3013},"end":{"line":126,"column":9,"offset":3019},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示底部的连接点","position":{"start":{"line":126,"column":12,"offset":3022},"end":{"line":126,"column":22,"offset":3032},"indent":[]}}],"position":{"start":{"line":126,"column":12,"offset":3022},"end":{"line":126,"column":22,"offset":3032},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":126,"column":25,"offset":3035},"end":{"line":126,"column":32,"offset":3042},"indent":[]}}],"position":{"start":{"line":126,"column":25,"offset":3035},"end":{"line":126,"column":32,"offset":3042},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":126,"column":35,"offset":3045},"end":{"line":126,"column":43,"offset":3053},"indent":[]}}],"position":{"start":{"line":126,"column":35,"offset":3045},"end":{"line":126,"column":43,"offset":3053},"indent":[]}}],"position":{"start":{"line":126,"column":1,"offset":3011},"end":{"line":126,"column":45,"offset":3055},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"left","position":{"start":{"line":127,"column":3,"offset":3058},"end":{"line":127,"column":7,"offset":3062},"indent":[]}}],"position":{"start":{"line":127,"column":3,"offset":3058},"end":{"line":127,"column":7,"offset":3062},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示左侧的连接点","position":{"start":{"line":127,"column":10,"offset":3065},"end":{"line":127,"column":20,"offset":3075},"indent":[]}}],"position":{"start":{"line":127,"column":10,"offset":3065},"end":{"line":127,"column":20,"offset":3075},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":127,"column":23,"offset":3078},"end":{"line":127,"column":30,"offset":3085},"indent":[]}}],"position":{"start":{"line":127,"column":23,"offset":3078},"end":{"line":127,"column":30,"offset":3085},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":127,"column":33,"offset":3088},"end":{"line":127,"column":41,"offset":3096},"indent":[]}}],"position":{"start":{"line":127,"column":33,"offset":3088},"end":{"line":127,"column":41,"offset":3096},"indent":[]}}],"position":{"start":{"line":127,"column":1,"offset":3056},"end":{"line":127,"column":43,"offset":3098},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"right","position":{"start":{"line":128,"column":3,"offset":3101},"end":{"line":128,"column":8,"offset":3106},"indent":[]}}],"position":{"start":{"line":128,"column":3,"offset":3101},"end":{"line":128,"column":8,"offset":3106},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"是否显示右侧的连接点","position":{"start":{"line":128,"column":11,"offset":3109},"end":{"line":128,"column":21,"offset":3119},"indent":[]}}],"position":{"start":{"line":128,"column":11,"offset":3109},"end":{"line":128,"column":21,"offset":3119},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Boolean","position":{"start":{"line":128,"column":24,"offset":3122},"end":{"line":128,"column":31,"offset":3129},"indent":[]}}],"position":{"start":{"line":128,"column":24,"offset":3122},"end":{"line":128,"column":31,"offset":3129},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为false","position":{"start":{"line":128,"column":34,"offset":3132},"end":{"line":128,"column":42,"offset":3140},"indent":[]}}],"position":{"start":{"line":128,"column":34,"offset":3132},"end":{"line":128,"column":42,"offset":3140},"indent":[]}}],"position":{"start":{"line":128,"column":1,"offset":3099},"end":{"line":128,"column":44,"offset":3142},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"size","position":{"start":{"line":129,"column":3,"offset":3145},"end":{"line":129,"column":7,"offset":3149},"indent":[]}}],"position":{"start":{"line":129,"column":3,"offset":3145},"end":{"line":129,"column":7,"offset":3149},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的大小","position":{"start":{"line":129,"column":10,"offset":3152},"end":{"line":129,"column":16,"offset":3158},"indent":[]}}],"position":{"start":{"line":129,"column":10,"offset":3152},"end":{"line":129,"column":16,"offset":3158},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":129,"column":19,"offset":3161},"end":{"line":129,"column":25,"offset":3167},"indent":[]}}],"position":{"start":{"line":129,"column":19,"offset":3161},"end":{"line":129,"column":25,"offset":3167},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为3","position":{"start":{"line":129,"column":28,"offset":3170},"end":{"line":129,"column":32,"offset":3174},"indent":[]}}],"position":{"start":{"line":129,"column":28,"offset":3170},"end":{"line":129,"column":32,"offset":3174},"indent":[]}}],"position":{"start":{"line":129,"column":1,"offset":3143},"end":{"line":129,"column":34,"offset":3176},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"fill","position":{"start":{"line":130,"column":3,"offset":3179},"end":{"line":130,"column":7,"offset":3183},"indent":[]}}],"position":{"start":{"line":130,"column":3,"offset":3179},"end":{"line":130,"column":7,"offset":3183},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的填充色","position":{"start":{"line":130,"column":10,"offset":3186},"end":{"line":130,"column":17,"offset":3193},"indent":[]}}],"position":{"start":{"line":130,"column":10,"offset":3186},"end":{"line":130,"column":17,"offset":3193},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":130,"column":20,"offset":3196},"end":{"line":130,"column":26,"offset":3202},"indent":[]}}],"position":{"start":{"line":130,"column":20,"offset":3196},"end":{"line":130,"column":26,"offset":3202},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为#72CC4A","position":{"start":{"line":130,"column":29,"offset":3205},"end":{"line":130,"column":39,"offset":3215},"indent":[]}}],"position":{"start":{"line":130,"column":29,"offset":3205},"end":{"line":130,"column":39,"offset":3215},"indent":[]}}],"position":{"start":{"line":130,"column":1,"offset":3177},"end":{"line":130,"column":41,"offset":3217},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"stroke","position":{"start":{"line":131,"column":3,"offset":3220},"end":{"line":131,"column":9,"offset":3226},"indent":[]}}],"position":{"start":{"line":131,"column":3,"offset":3220},"end":{"line":131,"column":9,"offset":3226},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点的边框颜色","position":{"start":{"line":131,"column":12,"offset":3229},"end":{"line":131,"column":20,"offset":3237},"indent":[]}}],"position":{"start":{"line":131,"column":12,"offset":3229},"end":{"line":131,"column":20,"offset":3237},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"String","position":{"start":{"line":131,"column":23,"offset":3240},"end":{"line":131,"column":29,"offset":3246},"indent":[]}}],"position":{"start":{"line":131,"column":23,"offset":3240},"end":{"line":131,"column":29,"offset":3246},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为#72CC4A","position":{"start":{"line":131,"column":32,"offset":3249},"end":{"line":131,"column":42,"offset":3259},"indent":[]}}],"position":{"start":{"line":131,"column":32,"offset":3249},"end":{"line":131,"column":42,"offset":3259},"indent":[]}}],"position":{"start":{"line":131,"column":1,"offset":3218},"end":{"line":131,"column":44,"offset":3261},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"lineWidth","position":{"start":{"line":132,"column":3,"offset":3264},"end":{"line":132,"column":12,"offset":3273},"indent":[]}}],"position":{"start":{"line":132,"column":3,"offset":3264},"end":{"line":132,"column":12,"offset":3273},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"连接点边框的宽度","position":{"start":{"line":132,"column":15,"offset":3276},"end":{"line":132,"column":23,"offset":3284},"indent":[]}}],"position":{"start":{"line":132,"column":15,"offset":3276},"end":{"line":132,"column":23,"offset":3284},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Number","position":{"start":{"line":132,"column":26,"offset":3287},"end":{"line":132,"column":32,"offset":3293},"indent":[]}}],"position":{"start":{"line":132,"column":26,"offset":3287},"end":{"line":132,"column":32,"offset":3293},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"默认为1","position":{"start":{"line":132,"column":35,"offset":3296},"end":{"line":132,"column":39,"offset":3300},"indent":[]}}],"position":{"start":{"line":132,"column":35,"offset":3296},"end":{"line":132,"column":39,"offset":3300},"indent":[]}}],"position":{"start":{"line":132,"column":1,"offset":3262},"end":{"line":132,"column":41,"offset":3302},"indent":[]}}],"position":{"start":{"line":123,"column":1,"offset":2921},"end":{"line":132,"column":41,"offset":3302},"indent":[1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"基于上面 ","position":{"start":{"line":135,"column":1,"offset":3305},"end":{"line":135,"column":6,"offset":3310},"indent":[]}},{"type":"link","title":null,"url":"#样式属性-style","children":[{"type":"text","value":"样式属性 style","position":{"start":{"line":135,"column":7,"offset":3311},"end":{"line":135,"column":17,"offset":3321},"indent":[]}}],"position":{"start":{"line":135,"column":6,"offset":3310},"end":{"line":135,"column":31,"offset":3335},"indent":[]}},{"type":"text","value":" 中的代码,下面代码在 ","position":{"start":{"line":135,"column":31,"offset":3335},"end":{"line":135,"column":43,"offset":3347},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">defaultNode</code>","position":{"start":{"line":135,"column":43,"offset":3347},"end":{"line":135,"column":56,"offset":3360},"indent":[]}},{"type":"text","value":" 中增加了 ","position":{"start":{"line":135,"column":56,"offset":3360},"end":{"line":135,"column":62,"offset":3366},"indent":[]}},{"type":"html","value":"<code class=\"language-text\">linkPoints</code>","position":{"start":{"line":135,"column":62,"offset":3366},"end":{"line":135,"column":74,"offset":3378},"indent":[]}},{"type":"text","value":" 配置项进行连入点的配置。","position":{"start":{"line":135,"column":74,"offset":3378},"end":{"line":135,"column":87,"offset":3391},"indent":[]}},{"type":"html","value":"<br />","position":{"start":{"line":135,"column":87,"offset":3391},"end":{"line":135,"column":93,"offset":3397},"indent":[]}},{"type":"image","title":null,"url":"https://cdn.nlark.com/yuque/0/2019/png/156681/1570869404810-6c6511bc-e579-49d3-a0c8-5c3e7f35ac70.png#align=left&display=inline&height=62&name=image.png&originHeight=124&originWidth=200&search=&size=15996&status=done&width=100","alt":"image.png","position":{"start":{"line":135,"column":93,"offset":3397},"end":{"line":135,"column":332,"offset":3636},"indent":[]}}],"position":{"start":{"line":135,"column":1,"offset":3305},"end":{"line":135,"column":332,"offset":3636},"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 size<span class=\"token punctuation\">:</span> <span class=\"token number\">5</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 <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":136,"column":1,"offset":3637},"end":{"line":155,"column":4,"offset":3910},"indent":[1,1,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":156,"column":1,"offset":3911}}}}