layout icon indicating copy to clipboard operation
layout copied to clipboard

Layout algorithms for graphs.

Results 61 layout issues
Sort by recently updated
recently updated
newest added

报错信息: ![image](https://user-images.githubusercontent.com/38740691/187399261-9f4a7e1b-f532-4916-8463-82df1516e7c4.png) 示例:https://x6.antv.vision/zh/examples/showcase/practices#tree 使用该数据可以重现

求一份X6使用ERLayout布局的文档!

现在引力系数是由画布面积和点数量决定的,而且和斥力系数公用一个。。。导致没法分开调节 https://github.com/antvis/layout/blob/master/src/layout/fruchterman.ts#L195 建议 加一个引力系数 attractive 在这里*common https://github.com/antvis/layout/blob/master/src/layout/fruchterman.ts#L195 或者在 https://github.com/antvis/layout/blob/master/src/layout/fruchterman.ts#L267 这里加个 node.x *= scaleKey,整体缩放,让画布里的点尺寸可以适应 (gpu的也希望同步加些调节参数)

现在的使用方法好像不太对吧,为什么我看到的是要实现 onLayoutEnd 回调函数? 比如gForce 布局,是用的 onLayoutEnd 回调函数? 在源码src/layout/gForce.ts 中,run 方法。

目前最新layout中export的layouts是固定枚举的,导致在用registerLayout自定义布局后,无法创建自定义布局实例,提示`"The layout method: '" + layoutType + "' does not exist! Please specify it first."` ![c45386040239410e6a551c3b7347563e](https://user-images.githubusercontent.com/9564933/145946142-89084bc3-c263-422e-abb5-9d67f82622c7.png) ![3829cac8bd5e03c7f8ab5f51d5d55260](https://user-images.githubusercontent.com/9564933/145947039-1e6a1b2e-73ad-48f0-a3be-303898163c6e.png) 之前版本中代码如下所示,可以成功创建自定义布局 ![9e675fa9e5c46db12ff13995cd11e2b1](https://user-images.githubusercontent.com/9564933/145946797-30d46c6a-a8b3-4301-b8c8-630149781930.png) 这里是否能修改为原来的样子,或者自定义布局的使用方式是否变了, 应该怎么使用

使用g6时遇到了一个问题,如下demo [demo](https://codesandbox.io/s/blazing-paper-j0dwu6?file=/src/App.vue) ![image](https://user-images.githubusercontent.com/27846243/157398401-ba3268ca-6728-4a80-a8b0-6bb7f81948be.png) demo中是2000条首尾相连的数据,布局模式使用Dagre 定位到 https://github.com/antvis/layout/blob/master/src/layout/dagre/src/order/init-order.ts 里面的方法dfs ```typescript const dfs = (v: string) => { if (visited.hasOwnProperty(v)) return; visited[v] = true; const node = g.node(v); if (!isNaN(node.rank as number)) {...

![1652752396(1)](https://user-images.githubusercontent.com/42179338/168712296-9ff14fdc-82fd-40b4-a373-2c83da52e74b.jpg) const options:ForceAtlas2LayoutOptions = { center: [600, 400], kr: 10, kg: 1, preventOverlap: true, type:'forceAtlas2' } const layout= new ForceAtlas2Layout(options) layout.init({ nodes: data.nodes, edges: data.edges, }) layout.execute() graph.data(data) graph.render()

可以直接基于这个模板:https://github.com/antvis/template - [ ] npm 包含上 src https://github.com/ant-design/ant-design-charts/issues/786 - [ ] 去除 tslint,已经不维护了,改成 eslint,参考模板 - [ ] 一些依赖好像并没有直接使用,比如 g-webgpu ,是否去除 https://github.com/antvis/layout/issues/43 - [ ] 如果定位是和 scale 一样,底层依赖,且可以社区使用,建议 readme 和文档参考 [scale](https://github.com/antvis/scale)...

## 问题描述 在使用 ANTV X6 集成 Layout ,使用 GridLayout 初始化模型数据时会出现异常:`nodeSize is not a function or its return value is not iterable`,尝试 Copy 官方源码实验也会出现同样的异常。 尝试使用 Dagre、Circle 的布局模式没有出现异常 ## 版本依赖 - @antv/[email protected]...

服务端用 vite 打包后包含了 dist 目录下的内容,开发环境没问题 ![image](https://user-images.githubusercontent.com/18088464/149725344-3956525d-7e51-41e0-9647-a29075c0bb6c.png) 排查发现非 commonjs 打包直接用了 window._ 来获取 lodash,求兼容~ ![image](https://user-images.githubusercontent.com/18088464/149726688-059f7734-544b-421c-a56d-06c6532aaad2.png) 所用版本:v0.1.22,文件目录:`node_modules/@antv/layout/dist/layout.min.js`