antvis/G6

[v5] layout 方法报不存在 #5945

liseri posted onGitHub

Describe the bug / 问题描述

  1. 需求或目的:想不渲染只执行布局,从而通过getData()方法获取布局后的x,y坐标
  2. 述求:实现只布局不渲染,通过getData()方法获取布局后的x,y坐标
  3. 图表例子链接: https://g6-next.antv.antgroup.com/zh/examples/layout/dagre/#antv-dagre-combo
  4. 文档链接: https://g6-next.antv.antgroup.com/api/graph/method#graphlayout
  5. 版本:v5.0
  6. 问题描述:graph.layout()方法报方法找不到
  7. 问题截图: image

https://g6-next.antv.antgroup.com/zh/examples/layout/dagre/#antv-dagre-combo

Steps to Reproduce the Bug or Issue / 重现步骤

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


如果你只想获取布局结果,建议直接使用 @antv/layout

posted by Aarebecca 10 months ago

@liseri try to call layout inside a timeout function with 100ms delay.

posted by hsingh-ds 10 months ago

Fund this Issue

$0.00
Funded

Pull requests