UNPKG

@antv/g6

Version:

graph visualization frame work

1 lines 4.65 kB
{"expireTime":9007200828528711000,"key":"transformer-remark-markdown-ast-90bad4f901aedd069776cbc6590267a3-gatsby-remark-prettiergatsby-remark-prismjsgatsby-remark-external-linksgatsby-remark-autolink-headersgatsby-remark-reading-time-","val":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Dagre 是适合有向流程图的布局算法。其根据图数据中边的方向,自动计算节点的层级及位置。","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":46,"offset":46},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":46,"offset":46},"indent":[]}},{"type":"heading","depth":2,"children":[{"type":"link","url":"#使用指南","title":null,"children":[],"data":{"hProperties":{"aria-label":"使用指南 permalink","class":"anchor"},"hChildren":[{"type":"raw","value":"<svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg>"}]}},{"type":"text","value":"使用指南","position":{"start":{"line":4,"column":4,"offset":51},"end":{"line":4,"column":8,"offset":55},"indent":[]}}],"position":{"start":{"line":4,"column":1,"offset":48},"end":{"line":4,"column":8,"offset":55},"indent":[]},"data":{"id":"使用指南","htmlAttributes":{"id":"使用指南"},"hProperties":{"id":"使用指南"}}},{"type":"paragraph","children":[{"type":"text","value":"G6 内置的 Dagre 布局可以实现有向图的自动分层布局。如下面代码所示,可在实例化 Graph 时使用该布局。除此之外,还可以如","position":{"start":{"line":6,"column":1,"offset":57},"end":{"line":6,"column":67,"offset":123},"indent":[]}},{"type":"link","title":null,"url":"https://www.yuque.com/antv/g6/qopkkg#eYZc6","children":[{"type":"text","value":"子图布局","position":{"start":{"line":6,"column":68,"offset":124},"end":{"line":6,"column":72,"offset":128},"indent":[]}}],"position":{"start":{"line":6,"column":67,"offset":123},"end":{"line":6,"column":117,"offset":173},"indent":[]},"data":{"hProperties":{"target":"_self","rel":"nofollow"}}},{"type":"text","value":"所示单独使用布局。该布局可以通过配置调整布局方向、节点对齐方式、节点间距、层高等。","position":{"start":{"line":6,"column":117,"offset":173},"end":{"line":6,"column":158,"offset":214},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":57},"end":{"line":6,"column":158,"offset":214},"indent":[]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"代码演示 1 :简单的 Dagre 布局。","position":{"start":{"line":7,"column":3,"offset":217},"end":{"line":7,"column":24,"offset":238},"indent":[]}}],"position":{"start":{"line":7,"column":3,"offset":217},"end":{"line":7,"column":24,"offset":238},"indent":[]}}],"position":{"start":{"line":7,"column":1,"offset":215},"end":{"line":7,"column":24,"offset":238},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"代码演示 2 :自左向右的 Dagre 布局。","position":{"start":{"line":8,"column":3,"offset":241},"end":{"line":8,"column":26,"offset":264},"indent":[]}}],"position":{"start":{"line":8,"column":3,"offset":241},"end":{"line":8,"column":26,"offset":264},"indent":[]}}],"position":{"start":{"line":8,"column":1,"offset":239},"end":{"line":8,"column":26,"offset":264},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"代码演示 3 :Dagre 布局参数动态变化。","position":{"start":{"line":9,"column":3,"offset":267},"end":{"line":9,"column":26,"offset":290},"indent":[]}}],"position":{"start":{"line":9,"column":3,"offset":267},"end":{"line":9,"column":26,"offset":290},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":265},"end":{"line":9,"column":26,"offset":290},"indent":[]}}],"position":{"start":{"line":7,"column":1,"offset":215},"end":{"line":9,"column":26,"offset":290},"indent":[1,1]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":10,"column":1,"offset":291}}}}