@antv/g6
Version:
graph visualization frame work
1 lines • 5.69 kB
JSON
{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-html-ast-156e024da81127de5e1722f098d18d19-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Force-directed layout is a set of algorithms which are imporved and extended by lots of researchers based on the earliest classical force-directed algorithm. They simulate the nodes and edges in the graph as the physical objects. There are attractive forces and repulsive forces between nodes to iteratively move them to reach a reasonable layout.","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":348,"offset":348}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":348,"offset":348}}},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"usage"},"children":[{"type":"element","tagName":"a","properties":{"href":"#usage","aria-label":"usage permalink","class":"anchor"},"children":[{"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":"Usage","position":{"start":{"line":4,"column":4,"offset":353},"end":{"line":4,"column":9,"offset":358}}}],"position":{"start":{"line":4,"column":1,"offset":350},"end":{"line":4,"column":9,"offset":358}}},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The classical force-directed layout in G6 comes from d3.js. As the demo below, you can deploy it in ","position":{"start":{"line":6,"column":1,"offset":360},"end":{"line":6,"column":101,"offset":460}}},{"type":"raw","value":"<code class=\"language-text\">layout</code>","position":{"start":{"line":6,"column":101,"offset":460},"end":{"line":6,"column":109,"offset":468}}},{"type":"text","value":" while instantiating Graph. it can also be used for ","position":{"start":{"line":6,"column":109,"offset":468},"end":{"line":6,"column":161,"offset":520}}},{"type":"element","tagName":"a","properties":{"href":"https://www.yuque.com/antv/g6/qopkkg#eYZc6","target":"_self","rel":"nofollow"},"children":[{"type":"text","value":"Subgraph Layout","position":{"start":{"line":6,"column":162,"offset":521},"end":{"line":6,"column":177,"offset":536}}}],"position":{"start":{"line":6,"column":161,"offset":520},"end":{"line":6,"column":222,"offset":581}}},{"type":"text","value":". ","position":{"start":{"line":6,"column":222,"offset":581},"end":{"line":6,"column":224,"offset":583}}}],"position":{"start":{"line":6,"column":1,"offset":360},"end":{"line":6,"column":224,"offset":583}}},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Example 1 : Basic force-directed layout and dragging interactions.","position":{"start":{"line":7,"column":3,"offset":586},"end":{"line":7,"column":69,"offset":652}}}],"position":{"start":{"line":7,"column":1,"offset":584},"end":{"line":7,"column":69,"offset":652}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Example 2 : Prevent node overlappings.","position":{"start":{"line":8,"column":3,"offset":655},"end":{"line":8,"column":41,"offset":693}}}],"position":{"start":{"line":8,"column":1,"offset":653},"end":{"line":8,"column":41,"offset":693}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Example 3 : Adjust the link distances and forces for different nodes.","position":{"start":{"line":9,"column":3,"offset":696},"end":{"line":9,"column":72,"offset":765}}}],"position":{"start":{"line":9,"column":1,"offset":694},"end":{"line":9,"column":72,"offset":765}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Example 4 : Fix the dragged node.","position":{"start":{"line":10,"column":3,"offset":768},"end":{"line":10,"column":36,"offset":801}}}],"position":{"start":{"line":10,"column":1,"offset":766},"end":{"line":10,"column":36,"offset":801}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Example 5 : Translate the layout parameters in dynamic.","position":{"start":{"line":11,"column":3,"offset":804},"end":{"line":11,"column":58,"offset":859}}}],"position":{"start":{"line":11,"column":1,"offset":802},"end":{"line":11,"column":58,"offset":859}}},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Example 6 : The bubbles layout and interactions.","position":{"start":{"line":12,"column":3,"offset":862},"end":{"line":12,"column":51,"offset":910}}}],"position":{"start":{"line":12,"column":1,"offset":860},"end":{"line":12,"column":51,"offset":910}}},{"type":"text","value":"\n"}],"position":{"start":{"line":7,"column":1,"offset":584},"end":{"line":12,"column":51,"offset":910}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":12,"column":51,"offset":910}}}}