开发预览 更新于 2026-05-10

ConnectionGraph 连接图

节点 + 边的关系图,节点未指定坐标时自动均匀放置在圆周上。

基础用法

数据通过 props 传入,纯 SVG 渲染,无第三方图表库依赖。 配色取自 --viz-1..8 token,色盲友好。

WebAPIAuthDBCacheQueue
<CfConnectionGraph ... />
<CfConnectionGraph ... />

微服务拓扑

7 个服务、7 条连线,展示典型 gateway 分发模式。

GatewayAuthUsersOrdersPaymentsInventoryNotify
<CfConnectionGraph :nodes="nodes" :edges="edges" />
<CfConnectionGraph nodes={nodes} edges={edges} />

API

属性类型默认值说明
nodesGraphNode[]{ id, label, x?, y?, colorIndex?, size? }[]
edgesGraphEdge[]{ source, target, weight?, colorIndex? }[]
showLabelsbooleantrue

反馈与讨论

ConnectionGraph 连接图 的讨论

0
0 / 600
一键发送
正在加载评论...