ConnectionGraph 连接图
节点 + 边的关系图,节点未指定坐标时自动均匀放置在圆周上。
基础用法
数据通过 props 传入,纯 SVG 渲染,无第三方图表库依赖。
配色取自 --viz-1..8 token,色盲友好。
<CfConnectionGraph ... /> <CfConnectionGraph ... /> 微服务拓扑
7 个服务、7 条连线,展示典型 gateway 分发模式。
<CfConnectionGraph :nodes="nodes" :edges="edges" /> <CfConnectionGraph nodes={nodes} edges={edges} /> API
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
nodes | GraphNode[] | — | { id, label, x?, y?, colorIndex?, size? }[] |
edges | GraphEdge[] | — | { source, target, weight?, colorIndex? }[] |
showLabels | boolean | true |
反馈与讨论
ConnectionGraph 连接图 的讨论