Antd design graphs 2,0, organization chart #3046
Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
-
This behavior is due to how the Dagre layout works. It’s designed for directed graphs, and with Changing the ranker (e.g., If you need precise control of a child’s position relative to its parent, you may need to:
|
Beta Was this translation helpful? Give feedback.
-
标题:OrganizationChart 组件节点定位异常问题分析 你好,根据你的描述,“节点 182 与父节点距离过远”,下面为你分析原因及解答。 1. 问题分析
2. 可能的原因根据观察与常见原理,导致节点间距过远的原因有:
3. 通用排查与修复建议由于 Ant Design Charts 文档未涵盖 PrimeReact 或其它 UI 组织结构图组件,这里提供通用排查思路:
4. 结论(及后续引导)
5. 追问请补充以下信息,方便进一步定位:
如需使用 Ant Design Charts 的树状图(TreeGraph),可参考官方文档:树图 TreeGraph - Ant Design Charts示例(TreeGraph 基础用法)import React from 'react';
import { TreeGraph } from '@ant-design/charts';
const data = {
id: 'root',
value: { label: 'Root' },
children: [
{
id: 'node1',
value: { label: 'Node 1' },
children: [
{ id: 'node1-1', value: { label: 'Node 1-1' } },
]
}
]
};
export default () => <TreeGraph data={data} />; 参数说明:
如需进一步帮助,请补充具体组件库及期望效果! 此回答由AI自动生成,仅供参考。如有疑问,请等待维护者回复。 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a issue with OrganizationChart component.
In this link you can view the issue: https://stackblitz.com/edit/react-adczua?file=index.js
The node 182 is positioned far from the parent node. Why?
Beta Was this translation helpful? Give feedback.
All reactions